MaterialsByName

Returns the indices of all materials of a specified name.

Syntax

Rhino.MaterialsByName (strName)

Parameters

strName

Required.  String.  The material name to match.

Returns

Array

An array of material indices if successful.

Null

If not successful, or on error.

Example

Dim strName, arrMaterials, i

strName = Rhino.GetString("Material name")

If Not IsNull(strName) Then

  arrMaterials = Rhino.MaterialsByName(strName)

  If IsArray(arrMaterials) Then

    For i = 0 to UBound(arrMaterials)

      Rhino.Print i

    Next

  End If

End If

Also See

MaterialsByColor