Grasshopper

algorithmic modeling for Rhino

Hi, I'm attempting to use grasshopper to control an external USB Board. I can control the board using Visual Basic commands (within Visual Studio), but when I load this into the VB or VB.net Component for grasshopper, the component returns a series of errors. I think the problem is that the communication routines for the board are contained in a DLL, which has been provided as a standard windows DLL, so cannot be referenced. The board is a Velleman VM110 (https://www.vellemanusa.com/support/downloads/?code=VM110#). Is it possible to have a component (even if I have to write it myself) run a script as Visual Studio does, but while accepting inputs from grasshopper?

Thanks in advance,

Callum

Views: 500

Replies to This Discussion

Hi Callum. Well, a dll is a dll, so you should be able to reference it. On the website a .Net 4.0 SDK is mentioned, so I guess implementing a few gh components redirecting to this sdk would be quite straightforward. What errors do you have?

Hi, thanks for replying so quickly. If I try to import the DLL through manage assemblies, a message appears telling me that it failed to load. The errors are all "Error (BC30183) Keyword is not valid as an identifier", even though it is the same script which works in Visual Studio. How could grasshopper components redirect to the sdk?

Thanks in advance,

Callum

Sounds like a reference or namespace import error leading to a syntax error.

Well, redirecting is not the right word, sorry. Just, once you reference an assembly via the VB or C# component in GH, you can then use the methods, classes etc. of the dll. I don't know what you have to do with your card, but since GH is itself based on .Net 4 if I am right, it should not be a problem to reference your SDK and use it in GH via the vb component.

Of course you could also compile components directly from VS.

I can't reference it without getting the error message from grasshopper breakpoint. I think I will try to write it myself from Visual Studio.

Thanks for your help,

Callum

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service