LayerMaterialIndex



Your Ad Here

Returns the material index of a layer.  A material index of -1 indicates that no material has been assigned to the layer.  Thus, the layer will use Rhino's default layer material.

Syntax

Rhino.LayerMaterialIndex (strLayer)

Parameters

strLayer

Required.  String.  The name of an existing layer.

Returns

Number

 A zero-based material index if successful.

Null

If not successful, or on error.

Example

Dim intIndex

intIndex = Rhino.LayerMaterialIndex("Default")

If IsNumeric(intIndex) Then

If intIndex = -1 Then

Rhino.Print "The default layer does not have a material assigned."

Else

Rhino.Print "The default layer has a material assigned."

End If

End If

Also See

Return to Rhino Index


Your Ad Here