update_pcb_from_schematic
Update PCB from schematic by importing the netlist, matching footprints by reference, and optionally removing stale unlocked footprints to keep the board synchronized.
Instructions
Update the PCB from the schematic (headless Tools -> Update PCB from Schematic).
Exports the schematic's netlist, loads the assigned footprints from
libraries, and binds every pad to its net. Creates the .kicad_pcb if
it does not exist; new footprints land in a grid cluster. Existing
footprints are matched by reference and keep their position; a
changed footprint assignment swaps the footprint in place. Stale
board footprints are reported, and removed only with delete_stale
(locked ones are never removed). Zones are NOT refilled: run
fill_zones afterward. Net names arrive exactly as KiCad's F8
produces them (local labels sheet-prefixed, e.g. "/SIG"); read them
with list_pcb_nets.
Requires kicad-cli. It no longer needs KiCad's pcbnew Python bindings.
Every byte this writes goes through the server's byte-preserving write, so
a board's format stamp does not move and the parts of it this tool did not
touch arrive unchanged.
Args:
schematic_path: Path to .kicad_sch file. Optional; omit to use the configured default.
pcb_path: Path to .kicad_pcb file (created if missing).
Optional; omit to use the configured default.
delete_stale: Remove unlocked board footprints absent from the schematic
project_path: Path to .kicad_pro for explicit root resolution (sub-sheets)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pcb_path | No | ||
| delete_stale | No | ||
| project_path | No | ||
| schematic_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| added | Yes | ||
| status | Yes | ||
| skipped | Yes | ||
| warnings | Yes | ||
| nets_added | Yes | ||
| pads_bound | Yes | ||
| fpid_changed | Yes | ||
| nets_removed | Yes | ||
| stale_removed | Yes | ||
| value_updated | Yes | ||
| orphaned_zones | Yes | ||
| orphaned_tracks | Yes | ||
| stale_footprints | Yes |