Grasshopper

algorithmic modeling for Rhino

I have a VS solution with 2 projects, one is compiled as gha, the other one to dll.

I declare some custom geometry classes/goos/params in the dll, as I want to reuse those objects with other gha files. I store only the GH_Components in the gha file, and those use the mentioned classes from the dll. Now the problem is Grasshopper won't load the parameter as a separate component (the one visible in the component bar)... which is beneficial if you want to internalize data etc.

I could put all the parameters etc. in the gha file, but then I can't reference the gha files in other VS projects (it only accepts the dll files).

The current ad hoc solution which I have is to create some dummy parameter classes in the gha which just inherit the params from the dll. Can't call that an elegant solution, but at least it works.

How ?

Views: 644

Replies to This Discussion

dll files and gha files are identical (only the extension differs) so perhaps the easiest solution is to rename your dll as well? I know Visual Studio doesn't like referencing assemblies that don't end in dll or exe or one of the other standard extensions, but I think it's possible.

It may be possible to force GH to load the dll as a plugin, but I'd like to know for sure you don't like solution #1 before delving into that.

Adding the reference directly in the .vbproj file seems to work. Intellisense and building works.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service