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/off
    • 2: frozen/thawed
    • 4: lock
    • 8: plot
    • 16: VPVSDFLT
    • 32: color
    • 64: linetype
    • 128: 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