(layerstate-restore layerstatename viewport [restoreflags])


Restores a layer state into the current drawing.


The layerstatename argument is a string specifying the name of the layer state to restore. The viewport argument is an ename (ads_name) of the viewport to which layerstatename should be restored. If viewport is nil, the layer state is restored to model space. The restoreflags argument is an optional integer sum affecting how the layer state is restored:
1- Turn off all layers not in the restored layer state.
2- Freeze all layers not in the restored layer state.
4- Restore the layer state properties as viewport overrides (requires viewport to be not a nil value).
Returns nil if the layer state does not exist or contains no layers; otherwise, returns a list of layer names.

Example

Code Returns
(layerstate-restore myLayerState viewportId 5) Layername1 Layername2

 

Tell me about...

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language