Forgot password?

Create an account!

Forum

« back

RhinoScript – Get Material Identifiers and Names

Messages

Please log in to write a message.

  • 3. Johannes (Nov 02, 2010 20.19):

    If you mean the material properties of excisting elements then take a look on that code.

            Dim arrNames, arrIndex, arrObjects
            Dim i
            Dim intIndex, strName
           
            arrObjects = Rhino.GetObjects("pick some objects")
           
            ReDim arrNames(Ubound(arrObjects))
            ReDim arrIndex(Ubound(arrObjects))     
           
            For i = 0 To Ubound(arrObjects)
                   
                    intIndex        = Rhino.ObjectMaterialIndex(arrObjects(i))
                    strName         = Rhino.MaterialName(intIndex)
                   
                    arrNames(i) = strName
                    arrIndex(i) = intIndex
                   
                    Call Rhino.PrintEx (i & "    Index: " & intIndex &_
                    "    Name: " & strName & "    Id: " & arrObjects(i))
                   
            Next
  • 2. oggologgo (Nov 01, 2010 16.11):

    Did you find it out?

  • 1. trojax (Oct 27, 2009 16.36):

    Hello everybody,
    how can I get all MaterialNames and the corresponding MaterialIdentifiers with RhinoScript in some kind of array?

    Thank you very much for every kind of answer or help!

    Daniel

Recommend

Why are these buttons gray?