MaterialId

Returns the identifier of a material given the material's index.

Syntax

Rhino.MaterialId (intMaterialIndex)

Parameters

intMaterialIndex

Required.  Number.  The zero-based material index.

Returns

Number

The material's identifier if successful.

Null

If not successful, or on error.

Example

Dim arrMaterials, intMaterial

arrMaterials = Rhino.MaterialIndices

If IsArray(arrMaterials) Then

  For Each intMaterial In arrMaterials

    Rhino.Print Rhino.MaterialId(intMaterial)

  Next

End If

Also See

MaterialIds

MaterialIndex

MaterialIndices