Thursday, September 25, 2008

this script is really stressing me out

im stressed out with the surface manipulation script. I can't figure out the "Ubound".

I am going to throw my monitor out the window.

Call movepts
Sub movepts

Dim strobject, y, n, arrpoints, grips

strobject = Rhino.GetObject("select plane")

Call Rhino.EnableObjectGrips(strobject)

grips = Rhino.selectobjectgrips(strobject)

'ReDim Preserve arrpoints(grips)

For n = 0 To UBound(arrpoints)-1

arrpoints = Rhino.objectgriplocation(strobject,n)

y = Rhino.objectgriplocation (strobject, n, Array(arrpoints(n)(0), arrpoints(n)(1),4*Rnd))

Next

End Sub


What am I doing wrong here?

1 comment:

sim_6 said...

I figured it out. I nearly killed myself to get it. It was simple, I needed to resize the array.