/docs/components/cad/api
API References
Technical reference for CAD layer and block snapshot/visibility messages.
Use these messages to fetch the current CAD structure from the active file.
- getLayers: Requests the current layer snapshot.
- getBlocks: Requests the current block snapshot.
Snapshot Requests
Both visibility messages require a `visible` flag and support multiple target selectors so the host can address one or many items at once.
- setLayerVisibility: Targets layers by `all`, `index`, `indexes`, `id`, `ids`, `name`, or `names`.
- setBlockVisibility: Targets blocks by `all`, `index`, `indexes`, `name`, or `names`.
Visibility Updates
The viewer returns normalized snapshot payloads that can be rendered directly by the host.
Viewer Responses
