cad_layer
Create, read, update, delete, or list CAD layers to organize objects for display and selection. Adjust visibility, locking, color, linetype, and linewidth.
Instructions
Create, read, update, delete or list layers.
聚合图层操作。按 ``action`` 派发:create / read / update / delete / list。
Layers group objects for display and selection. ``create`` accepts
color / linetype / linewidth; ``update`` can also toggle ``visible`` /
``locked``; ``delete`` removes the layer *and* the objects on it.
When not to use: for per-object layer membership use ``cad_object``
(create/update with a ``layer``); for per-layer object counts use
``cad_status`` (target=layer). To hide objects without deleting them
prefer ``cad_layer`` (update visible=false).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | Yes | Layer action to perform, discriminated by `action`: create, read, update, delete or list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Layer name | |
| color | No | Layer color | |
| action | Yes | Layer action executed | |
| layers | No | Layer definitions | |
| locked | No | Lock state | |
| status | Yes | Operation status | |
| message | No | Status description | |
| visible | No | Visibility | |
| linetype | No | Line type | |
| linewidth | No | Line width |