LayerLocked

Returns or changes the locked mode of a layer. This method should be use instead of LayerMode.

Syntax

Rhino.LayerLocked (strLayer [, blnLocked])

Parameters

strLayer

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

blnVisible

Optional.  Boolean.  The new layer locked mode.  True = Locked, False = Unlocked.

Returns

Boolean

If a layer mode is not specified,  the current layer locked mode if successful.

Boolean

If a layer mode is specified, the previous layer locked mode if successful.

Null

If not successful, or on error.

Example

Dim arrLayers, strLayer

arrLayers = Rhino.LayerNames

If IsArray(arrLayers) Then

  For Each strLayer In arrLayers

    If Rhino.LayerLocked(strLayer) = True Then

      Rhino.LayerLocked strLayer, False

    End If

  Next

End If

Also See

LayerMode

LayerVisible