Forgot password?

Create an account!


« back

RhinoScript – Array Issues


Please log in to write a message.

  • 3. KSchillaci (Jun 21, 2011 14.06):

    Hi Johannes,

    Thanks for the response. That makes sense and seems to work until it trys to call the array to draw lines. I fails saying it must be a one dimensional array?

  • 2. Johannes (Jun 21, 2011 08.32):


            Dim x  : x = Rhino.GetInteger("Number: ")
            Dim arrPoints
            ReDim arrPoints(x-1)
            Dim i
            For i = 0 To x-1               
                    arrPoints(i) = Rhino.GetPoint("pick point")            
            Call Rhino.AddLine(arrPoints(0), arrPoints(x-1))

    take a look on these two developer informations:

    101(good array description):

    rhinoscript (array ubound):

  • 1. KSchillaci (Jun 21, 2011 05.50):

    I am having trouble figuring out the code for an array.

    The logic of what I want to do goes like this.

    1.Ask the user "for a number of trails per month" , x=somenumberoftrails
    2. use the x value as the number of variables for an array.
    3.Call each variable in the array and ask to Rhino.getobjects(0 to x) [Store Points]
    4.Be able to retrieve each variable in the array for later use array(n)

    Any help would be appreciated on what the code would look like



Why are these buttons gray?