generative modeling for Rhino
How can i import a list generated by some other component in grasshopper inside a VB component ?
I assumed it worked as a 1D Array so created the following script, but it gave the error "Index was out of range: Must be a non-negative and less than the size of the collection : Parameter Name Index(line 0)"
Private Sub RunScript(ByVal x As List(Of Boolean), ByVal y As Object, ByRef A As Object)
Dim i , j , p As Integer
Dim arr1(y ,y) As int32
p = 0
For i = 0 To y
For j = 0 To y
If x(p) = True Then
arr1(i, j) = 1
arr1(i, j) = 0
p = p + 1
Here are the files...
If you have y elements in a collection, the index can go from 0 to y-1.
So: For i=0 to y-1 and For j=0 to y-1, or index will go out of range.
Oh...that was causing all the problem... I was so focused on the way i called the list and assigned it to 2D array, that i missed the flaw in the logic...
Thanks alot SYSTEMIQ ...