Forgot password?

Create an account!


« back

RhinoScript – Change Object Layer


Please log in to write a message.

  • 3. fezoff (May 24, 2009 18.58):

    It did work, I'm not entirely sure how yet, at the minute I'm just trying to figure it all out line by line. I guess there is no easy way about it.

    Thank you

  • 2. Hanno (May 24, 2009 17.03):

    Hi Gabriel,

    you have to pay attention to the definitions in the RhinoScript documentation: IsCurve needs an object id as parameter and returns true (curve) or false (no curve). You cannot get your object ID from this function. Like this it will work:

    Dim arrAllObjects
    Dim strObjectID

    arrAllObjects = Rhino.AllObjects
    For Each strObjectID In arrAllObjects
            If Rhino.IsCurve(strObjectID) Then
                    Call Rhino.ObjectLayer(strObjectID, "c")
            End If

    Hope that helps!


  • 1. fezoff (May 24, 2009 13.46):


    I am new to scripting and am just trying to get my head around a few things. There is one thing that's really been frustrating, I've been trying to get the following script to take all curves in a file and place them in one layer;

    Dim strObjectID
    strObjectID = Rhino.IsCurve

    If Rhino.IsCurve Then
    Call Rhino.ObjectLayer (strObjectID, "c")
    End If

    the most frustrating thing is that I am pretty sure its just a minor stupid thing that i don't know of just yet. So please, your help would be much appreciated.




Why are these buttons gray?