Creates a layer service bound to a database.
Database whose layer table will be mutated.
Collects entity snapshots on a layer for LAYDEL undo.
Layer whose entities should be snapshotted.
Cloned entities with owner and object ids.
Collects distinct layer names from a set of entity ids.
Entity ids to inspect.
Resolved layer names and names missing from the layer table.
Creates missing layers.
Layer names to create.
Count of created layers and names that already existed.
Deletes a layer and all entities on it (LAYDEL).
Layer 0 and the current layer cannot be deleted.
Name of the layer to delete.
Success with undo snapshots, or a failure reason.
Freezes the layer of a picked entity (LAYFRZ).
Selected entity id.
Outcome with previous frozen state for session undo, or a failure reason.
Resolves live layer-table traits for rendering and style synchronization.
Name of the layer to resolve from the layer table.
Resolved sub-entity traits, or undefined when the layer is missing.
Resolves the layer name of an entity.
Entity object id.
Trimmed layer name, or undefined when the entity is missing.
Returns summary rows for all layers.
Display-oriented summary for each layer in the table.
Isolates layers by name using LAYISO semantics.
Target layers are turned on, thawed, and unlocked. Other layers are turned off
or locked depending on isolationMode. LockAndFade locks only; the viewer
does not render a fade effect.
Names of layers to keep visible.
How non-isolated layers are hidden.
Isolation result with undo snapshot, or undefined when layerNames is empty.
Keeps one layer visible and turns all others off (UI quick-isolate).
Does not capture a LAYUNISO snapshot; use isolateLayers for
command semantics.
Layer to keep visible.
true when the layer exists and isolation was applied.
Locks the layer of a picked entity (LAYLCK).
Selected entity id.
Success or failure outcome.
Creates a layer if missing, then makes it current.
Layer name to create or activate.
true when the layer is current after the operation.
Parses color input for layer color assignment.
Accepts ACI index (1–255) or color strings understood by AcCmColor.fromString.
Raw color string from the user or UI.
Parsed color, or undefined when invalid.
Parses layer name input supporting * and comma-separated names.
Raw user input (e.g. A,B or *).
Deduplicated list of layer names.
Removes entities previously captured for LAYDEL.
Entity snapshots to erase from their owners.
Resolves layer records by name.
Layer names to look up.
Resolved records and names that were not found.
Restores a deleted layer and its entities for LAYDEL session undo.
Cloned layer table record to re-add.
Entity snapshots to append back to their owners.
Turns off every layer except the current layer.
Number of layers turned off.
Turns on every layer in the table.
Number of layers changed from off to on.
Sets current layer (CLAYER), ensuring it is on and thawed.
Layer name to make current.
true when the layer exists and was set current.
Assigns color to a single layer.
Target layer name.
Color to assign.
true when the layer exists and color was set.
Updates a layer description.
Target layer name.
New description text.
true when the layer exists and description was set.
Freezes or thaws a single layer.
UI callers should pass { switchCurrentLayer: true } when freezing the
current layer so drawing continues on a visible, thawed layer.
Target layer name.
Desired frozen state.
Optional behavior when freezing the current layer.
true when the layer exists and was updated.
Restores frozen state by layer name for LAYFRZ session undo.
Target layer name.
Frozen state to restore.
true when the layer exists and state was applied.
Assigns a linetype name to a single layer.
Target layer name.
Linetype table record name.
true when the layer exists and linetype was set.
Assigns line weight to a single layer.
Target layer name.
Line weight value to assign.
true when the layer exists and line weight was set.
Locks or unlocks a single layer.
Target layer name.
Desired locked state.
true when the layer exists and was updated.
Restores off state by layer name for LAYOFF session undo.
Target layer name.
Off state to restore.
true when the layer exists and state was applied.
Turns a single layer on or off.
When turning off the current layer, pass { switchCurrentLayer: true }
(as AcApLayerStore does) to move CLAYER first. CLI commands leave
the default false and rely on batch helpers to skip the current layer.
Target layer name.
Desired visibility (true = on).
Optional behavior when turning off the current layer.
true when the layer exists and was updated.
Sets whether a layer is included when plotting.
Target layer name.
true to plot the layer; false to exclude it.
true when the layer exists and was updated.
Assigns the same color to multiple layers.
Layer names to update.
Color to assign to each resolved layer.
Batch toggles frozen state.
Layer names to update.
true to freeze, false to thaw.
Optional skip rules for the current layer.
Names of current layers skipped when freezing.
Batch toggles lock state.
Layer names to update.
true to lock, false to unlock.
Batch toggles layer visibility.
Layer names to update.
true to turn layers off, false to turn them on.
Optional skip rules for the current layer.
Names of current layers skipped when turning off.
Assigns transparency to a single layer.
Target layer name.
Transparency value to assign.
true when the layer exists and transparency was set.
Moves CLAYER away from a layer before turning it off or freezing it.
Layer that will be turned off or frozen.
true when CLAYER is no longer the target layer, or target was not current.
Thaws all frozen layers in the table.
Number of layers thawed.
Turns off the layer of a picked entity (LAYOFF).
Selected entity id.
Outcome with previous off state for session undo, or a failure reason.
Restores a LAYISO snapshot.
Snapshot previously produced by isolateLayers.
Number of layers whose state was restored.
Unlocks the layer of a picked entity (LAYULK).
Selected entity id.
Success or failure outcome.
StaticapplyApplies a captured LAYERP snapshot to a database.
Database whose layer table should be updated.
Snapshot previously captured on the owning document.
true when the snapshot's current layer still exists.
StaticisReturns whether a layer is locked according to its standard flags.
Layer record to inspect.
true when the locked bit is set.
StaticopenOpens an existing layer table record for write.
Returns the layer-table instance from AcDbLayerTable.getAt, not the
result of AcDbDatabase.openObjectForWrite. Some drawings reuse the
same handle in different symbol tables (for example layer PLATE and text
style Standard both using id 11); global id lookup would open the wrong
record and layer visibility edits would silently no-op.
Database containing the layer table.
Layer record or name to open.
Opened layer record, or undefined when not found.
StaticresolveResolves live layer-table traits from the given database.
Database whose layer table supplies the record.
Name of the layer to resolve.
Resolved sub-entity traits, or undefined when the layer is missing.
StaticsetSets or clears the frozen bit on a layer record.
Layer record to modify.
Desired frozen state.
StaticsetSets or clears the locked bit on a layer record.
Layer record to modify.
Desired locked state.
Centralizes layer table mutations for commands and UI consumers.
Wraps on/off, freeze/thaw, lock/unlock, color, isolation (
LAYISO/LAYUNISO), deletion (LAYDEL), and related operations with consistent undo handling. Document-scoped session state (LAYERP,LAYUNISOsnapshots) lives on AcApDocument.