Hello everyone!
What’s the way to creat a Grasshopper components that can be added at input, added at output, optional at input and optional at battery?
Thank you in advance for your answer!
Hello everyone!
What’s the way to creat a Grasshopper components that can be added at input, added at output, optional at input and optional at battery?
Thank you in advance for your answer!
You must implement the IGH_VariableParameterComponent
interface to get addable/removable inputs and outputs.
To add items into the menu of components, override the AppendAdditionalComponentMenu
method. Or something much like it, I don’t remember exactly what it’s called.
Hey,
Here is a sample template were I show you how to implement in a basic level IGH_VariableParameterComponent
interface as well as how to override the AppendAdditionalComponentMenu
method.
I simplified it from a version I had written, unfortunately I did not compile this new version to see if it is error free, but I am sure it works (:
You can find the documentation of the IGH_VariableParameterComponent
interface here
MyFirstZUIComponent.cs (6.2 KB)
Thank you for your reply! Let me know where to start.
Just make a gh component in visual studio:
namespace { }
, inside the file that comes by default with the templateIf you have never done this before check here: