Layer State Methods

Rhino's LayerStateManager command allows you to save the states of layers and restore them at a later time.  The command is implemented in the Rhino Bonus Tools plug-in, or RhinoBonusTools.rhp. Because the LayerStateManager command resides in a plug-in, you will first need to get the plug-in's scriptable object, using GetPlugInObject, before you can call any of these methods.

For example:

 

Sub TestLayerStates

  Dim objPlugIn

  On Error Resume Next

  Set objPlugIn = Rhino.GetPluginObject("Rhino Bonus Tools")

  If Err Then

    MsgBox Err.Description

    Exit Sub

  End If

  'TODO: call a layer state method...

End Sub

 

Method

Description

DeleteLayerState

Deletes a layer state.

ExportLayerStates

Exports layer states to a file.

ImportLayerStates

Import layer states from a file.

IsLayerState

Verifies that a layer state exists.

LayerStateCount

Returns the number of layer states.

LayerStateNames

Returns layer state names.

RenameLayerStates

Renames a layer state.

RestoreLayerStates

Restores a saved layer state.

SaveLayerState

Saves a layer state.