DeleteLayer

Removes an existing layer from the document.  The layer to be removed cannot be the current layer.  Unlike the PurgeLayer method,  the layer must be empty, or contain no objects, before it can be removed. Any layers that are children of the specified layer will also be removed if they are also empty.

Syntax

Rhino.DeleteLayer (strLayer)

Parameters

strLayer

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

Returns

Boolean

True or false indicating success or failure.

Null

On error.

Example

Dim strLayer

strLayer = Rhino.GetString("Layer to remove")

If Not IsNull(strLayer) Then

Rhino.DeleteLayer(strLayer)

End If

Also See

AddLayer

CurrentLayer

PurgeLayer

RenameLayer