pcb_manage_layers
Manage PCB layer properties and visibility: get all layers, select the active layer, show/hide, lock/unlock, modify, add/remove custom layers, and set copper layer count.
Instructions
Manage PCB layers. Actions:
get_all: get all layers with properties
select: set active layer (layer: string)
set_visible: show layer(s) (layer optional; setOtherLayerInvisible optional for solo mode)
set_invisible: hide layer(s) (layer optional; setOtherLayerVisible optional)
lock: lock layer(s) (layer optional)
unlock: unlock layer(s) (layer optional)
set_copper_count: set copper layers (count: 2,4,6,...,32). WARNING: REDUCING the count permanently discards all copper (tracks, pours, vias' inner connections) on the removed inner layers. No undo, and no backup snapshot is taken. Export the board first (pcb_export_to_file or document_save_to_file) if the layers being removed hold routing.
modify: modify layer properties (layer: string, property: {name?, type?, color?, transparency?})
add_custom: add a new custom layer
remove: remove a custom layer (layer: string). WARNING: deletes the layer AND everything drawn on it. No undo, no backup snapshot. Export first if in doubt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Copper layer count (for set_copper_count) | |
| layer | No | Layer name(s) | |
| action | Yes | Action to perform | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| property | No | Properties to modify (for modify action) | |
| instance_id | No | Target EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances. | |
| setOtherLayerVisible | No | Show all other layers (for set_invisible) | |
| setOtherLayerInvisible | No | Hide all other layers (for set_visible) |