algorithmic modeling for Rhino
Hi everyone
I tried using Grasshopper.Utility.InvokeSetter method in C#, in many cases it works as sweet as CallByName() in VB, but as I'm using it to set an array, It seems not a good way while in VB we can set each items of an array.
Indeed I need to control sliders in GalapagosGeneListObject so I have to change the "Value" that in VB we can make it by the following way:
CallByName(obj, "Count", CallType.Set, count)
----------> Grasshopper.Utility.InvokeSetter(obj, "Count", count);
But:
For i As int = 0 To count - 1
CallByName(obj, "Value", CallType.Set, i, v)
Next
--------> ?
for (int i=0;i<count;i++)
???????
//// maybe something like:
////Grasshopper.Utility.InvokeSetter(obj, "Value", new double[]{1,2,3,4,5,6});
can anyone help me?
Tags:
You could use the dynamic keyword in C#, that might work.
Thanks David, I'll try to figure it out.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by