I’m trying to make a custom component (using C#) which is resizable, so I’m making a attribute class that inherits from GH_ResizableAttributes. It’s a bit of a struggle atm, since I’d like my component to have a input, but I can’t get it to work. By overriding the Render-function, I can draw an input grip, but I can’t use it… It’s like Grasshopper doesn’t know it’s there, even though I’ve also added the input in the component-class.
I’m thinking I might need to add something in the Layout-function too, but I can’t figure out how/what? So I would really appreciate if anyone has any inputs on this!
In my GH-component class I have;
public class MyComponent: GH_Component
………
…
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
pManager.AddIntegerParameter(“Numbers”, “Numbers”, “Numbers”, GH_ParamAccess.list);
}
Then in my attributes-class:
public class ComponentsAttributes: GH_ResizableAttributes
Solved this by changing my GH_Component to a GH_Param! GH_Param however has one output too, by default. Now, by overriding the Render-function I don’t draw the output but it’s still there - I can still grap an output that isn’t drawn.
Do anyone know how to remove the output completely?