RenameLayer

Renames an existing layer.

Syntax

Rhino.RenameLayer (strOldName, strNewName)

Parameters

strOldName

Required.  String.  The name or identifier of an existing layer.

strNewName

Required.  String.  The new layer name. Specify the layer's short name, not is full path name.

Returns

String

The new layer name if successful.

Null

If not successful, or on error.

Example

Dim strOldName, strNewName

strOldName = Rhino.GetString("Old layer name")

If Not IsNull(strOldName) Then

strNewName = Rhino.GetString("New layer name")

If Not IsNull(strNewName) Then

Rhino.RenameLayer strOldName, strNewName

End If

End If

Also See

AddLayer

CurrentLayer

DeleteLayer