algorithmic modeling for Rhino
Hi Andrea,
If you right click in the middle of the C# Script component you will get this context menu:
Where you will be able to:
1) define the inputs
2) change the specific input's properties
3) Change the name of the input
4) access the type of input menu
5) change the structure of inputs
6) select the type of input.
Danny,Thank you very much for rapid reply,but,may be i didnot show it clearly.....so change the way in another case:i just want the "A"(output)to be "int" instead of"double"(i know i can use "int component",but i dont know how to do it the same in C#),,,,so,in this case i must to creat a List of "int" in C#...then transfer it to A.
You cannot associate a type with script outputs. They will accept whatever you shove in there. If you shove in doubles, you'll get doubles. If you shove in integers, you'll get integers. If you shove in IEnumerable(Of Integer), you'll get lists of integers.
If you want to convert doubles into ints, you can use:
A = Convert.ToInt32(myDoubleValue)
The System.Math namespace provides some methods for specific rounding behaviour if you don't like Convert.ToInt32().
--
David Rutten
david@mcneel.com
Poprad, Slovakia
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