Function Entry: LAYERSTATE-SAVE
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: LAYERSTATE-SAVE
Name
layerstate-save
Class
Layer-State Function
Syntax
(layerstate-save layerstatename mask viewport)
Arguments and Values
layerstatename: string.mask: integer; sum of property bits to capture:1: on/off2: frozen/thawed4: lock8: plot16: VPVSDFLT32: color64: linetype128: lineweight
viewport: ename of a viewport (to capture VPLAYER settings), or nil to exclude viewport-specific settings.
Description
Saves a layer state in the current drawing under the given name with the selected property bits.
Return Values
T on success; nil on failure.
Side Effects
Creates or updates the named layer-state record in the drawing.
Examples
(layerstate-save "myLayerState" 21 viewportId)returns T.(layerstate-save "myLayerState" nil nil)returns nil.
Availability
- AutoCAD 2026: documented (Windows, macOS).
- BricsCAD V26: parallel function is
vl-layerstates-save(chapter 24). - Status: AutoCAD-named family with BricsCAD divergence — see Phase 4 reconciliation.
See Also
- BricsCAD analogue:
vl-layerstates-save(chapter 24). - Family pair documented in
vendor-inventory-2026.org§10 item 6.
Source Notes
- [layerstate-save (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-05B5EA5C-2E7F-47A5-9C6F-27902DB60F30.htm)
- Status: documented (Phase 3 body fill).