Forgot password?

Create an account!

Forum

« back

RhinoScript – Error in this script

Messages

Please log in to write a message.

  • 4. pulgarata (Dec 01, 2015 21.24):

    I think "Rhino.ObjectsByRegion" could help.
    I suggest to you exploring this function.

    Regards,

    Sebastián.

  • 3. Charly (Dec 01, 2015 21.03):

    Thank you very much Sebastián!! it solved the problema

    I have another question, do you know wich command could I use to selectionate objects into a determinate area or domain? I mean, the same operation that we make with the mouse by selectionating objects into a rectangle with the mouse.

    Thank you!!

  • 2. pulgarata (Dec 01, 2015 13.26):

    Hello Charly,
    You have to write in this way:

    Call Rhino.addsrfpt(ARRAY(p1, p2, p3, p4))

    Also, replace

    z = hcub

    with

    z = hcub + z

    It works for me.

    Regards,
    Sebastián.

  • 1. Charly (Nov 30, 2015 19.55):

    Hi all!

    I'm working on the following script. The objective is that it asks you the number of decks of floors in a building. Then it will ask you the height of each deck, and the objective is that it generates a horizontal plane at the height of each floor.
    The problema is that is returns me an error when I try to use the "Rhino.addsrfpt" (I've also tried with "Rhino.Planefromframe" and others similar). This error tells me that the number of arguments is wrong or the asignation of property is not valid.
    Do you know where could be the error? Thank you very much

    Charly




    Dim ncub, i

    ncub = Rhino.Realbox("Specify the number of decks", , "Number of decks")
    i = 1

    If IsNumeric(ncub) And ncub > 0 Then
    While i < (ncub + 1)
    hcub = Rhino.Realbox("Height of the deck " & i & " in meters", , "Deck" & i)
    z = hcub
    If IsNumeric(hcub) And hcub > 0 Then

    p1 = Array(-50, -100, z)
    p2 = Array(-50, 100, z)
    p3 = Array(400, 100, z)
    p4 = Array(400, -100, z)

    Call Rhino.addsrfpt(p1, p2, p3, p4)

    Else
    End If

    i = i + 1

    Wend
    Else
    End If

Recommend

Why are these buttons gray?