Those any one know how to call a String obtained by another function?
I created some planes in a Sub, now on other Sub I want to call that plane to use for intersection.
Problem is I don’t know how to reference the string in a different Sub
Dim point1, point2, point3, point4, Plane1
point1 = rhino.addpoint(0,0,0)
point2 = rhino.addpoint(10,10,0)
point3 = rhino.addpoint(-10,-10,0)
point4 = rhino.addpoint(-10,10,0)
plane1 = rhino.addsurface(point1, point2, point3, poin4)
How do I call the Plane1??
will help me alot organize this script which is all in 1 Sub
Hello- instead of making the plane in a sub, make it a function that returns the plane as its result:
MakePlane = rhino.addsurface(point1, point2, point3, poin4)
dim Plane1: Plane1 = MakePlane()
Can I make more then 1 plane per function? how do I then call a specific plane then?
Or is just better to do 1 plane per function?
You can make an array of planes and then access the array by index.
So, your function would build up an array
dim i, arrPlanes
for i = 0 to num-1
arrPlanes(i) = rhino.addsurface(point1, point2, point3, poin4)
dim aPlanes: aPlanes = MakePlanes(5)
dim Plane1: Plane1 = aPlanes(0)
dim Plane2: Plane2 = aPlanes(1)
Cool, I see
Will give it a go, thanks so much for your help.
As always you guys kick ass!!!