algorithmic modeling for Rhino
Dear GHA developers. As you may have noticed the preferred gui for variable parameters has changed in 0.8.0060. The old gui is still available, but has been marked Obsolete and will soon no longer be visible in Visual Studio autocomplete.
If you have a GH_Component class that implements IGH_VarParamComponent and you wish to switch over to the new gui, please do the following:
Methods to implement for IGH_VariableParameterComponent:
I'll try and write a topic for this in the SDK documentation as soon as possible but until then, feel free to ask any questions about this here.
this is your problem:
IGH_Param p = (IGH_Param)new Grasshopper.Kernel.Types.GH_Number(0);
p.NickName = GH_ComponentParamServer.InventUniqueNickname("abc", Params.Input);
You need to return an instance of a class which implements IGH_Param.
GH_Number is a data type, not a parameter.
Param_Number param = new Param_Number();
param.Name = "Input X";
param.NickName = "X";
param.Description = "Do something";
where Param_Number can be found in the Grasshopper.Kernel.Parameters namespace.
I've changed the comments to English and corrected everything in the attached file. Now it works :)
It's a simple adder, that adds the variable inputs into one single output, but I hope it helps anyone who founds himself stuck as I were.
Thanks so much, It helped me.
I am updating some components with the old Variable Parameters system with the new ZUI version. Everything is going ok, except this particular component has no output parameters and I am saying that if the side is output, no parameters should be able to be added:
public bool CanInsertParameter(GH_ParameterSide side, int index)
if (side == GH_ParameterSide.Output)
if(index == 0)
Still, I get a + sign on the output:
Just a little thing, but it's messing with me!
Darn, it's a bug (obviously). When there are no outputs I dont even ask whether it's ok to draw a (+)... It'll be fixed in the next release, nothing you can do about it in the meantime...
OK. Happy to help finding bugs! Thanks for the reply.