LayerName

Returns the name of a layer given the layer's identifier.

Syntax

Rhino.LayerName (strLayer [, blnFullPath])

Parameters

strLayer

Required.  String.  The identifier of an existing layer.

blnFullPath

Optional.  Boolean.  If True (Default), the layer's full path name is returned. If False, the layer's short name, as it appears in Rhino's Layer dialog, is returned.

Returns

String

The layer's name if successful.

Null

If not successful, or on error.

Example

Dim arrLayers, strLayer

arrLayers = Rhino.LayerIds

If IsArray(arrLayers) Then

  For Each strLayer In arrLayers

    Rhino.Print Rhino.LayerName(strLayer)

  Next

End If

Also See

LayerId