I hope will be enough clear in sharing my question.
C# in Visual Studio, I am trying to develop a grasshopper component.
I am interested in changing the behavior of the pManager[1], it needs to be required input when pMnager[0]= int 1 (as value) and to be optional when pManager[0]= int 0
In this way the component, after being compiled, will not ask for pManager[1] when the variable assigned to pManager[0] has a value equal to int 0;
pManager.AddIntegerParameter("A", "A", "description", GH_ParamAccess.item); //-->pManager[0]
pManager.AddTextParameter("B", "B", "Adescription", GH_ParamAccess.item); //-->pManager[1]
Thank you in advance!
A way to assign this behaviour to PManager[0].
pManager[1].Optional=true; (or false) but I can't get the value assigned to pManager[0] (something like this .GetValue() == 0; etc.
Ok seems I have solved it (or something like that):
directly in the
solverInstance: