Function Entry: LAYERSTATE-ADDLAYERS

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: LAYERSTATE-ADDLAYERS

Name

layerstate-addlayers

Class

Layer-State Function

Syntax

(layerstate-addlayers layerstatename (list layername state color linetype lineweight plotstyle) [(list ...)])

Arguments and Values

  • layerstatename: string; the layer state to update.
  • One or more lists, each describing a layer:
    • layername: string.
    • state: integer; sum of 1 (off), 2 (freeze), 4 (lock), 8 (no plot), 16 (frozen in new viewports). nil uses defaults.
    • color: dotted pair (62 . ColorIndex) (or 420/430 codes for true-color or color-book).
    • linetype: string; layer linetype name. nil defaults to "Continuous".
    • lineweight: integer; valid lineweight. nil defaults to "Default".
    • plotstyle: string; plot-style name. nil defaults to "Normal".

Description

Adds or updates layers within an existing layer state.

Return Values

T on success; otherwise nil.

Side Effects

Updates the named layer state in the current drawing.

Examples

(layerstate-addlayers
  "myLayerState"
  (list "Walls" 4 '(62 . 45) "Divide" 35 "10% Screen")
  (list "Floors" 6 '(420 . 16235019) "Continuous" 40 "60% Screen")
  (list "Ceiling" 0 '(430 . "RAL CLASSIC$RAL 1003") "DOT" nil nil))

Availability

  • AutoCAD 2026: documented (Windows, macOS).
  • BricsCAD V26: not under this name. The BricsCAD parallel family is vl-layerstates-*; see chapter 24 cross-reference.
  • Status: AutoCAD-named family with BricsCAD divergence — see Phase 4 reconciliation.

See Also

  • No direct BricsCAD analogue. BricsCAD's parallel vl-layerstates-* family does not currently document this operation; consider implementing in user code or treating as AutoCAD-only.
  • Family pair documented in vendor-inventory-2026.org §10 item 6.

Source Notes