pcb_delete_net
Deletes empty nets from the active PCB to clean up stray nets left after removing components; optionally removes connected nets with force, orphaning their pads and tracks.
Instructions
Delete nets from the active PCB.
By default removes only EMPTY nets (no connected pads / tracks /
vias): the cleanup for stray nets left behind after deleting
components, e.g. nets created by pcb_place_components' synced
mode. A net that still has connections is skipped unless
force=True (forcing orphans those pads/tracks, so use it
deliberately).
Args: nets: Specific net names to delete. Omit (or pass an empty list) to sweep ALL empty nets on the board. force: Also delete nets that still have connected primitives (orphans them). Default False.
A net name containing a COMMA is refused rather than sent. The
list rides one comma-separated field and the handler splits it
with Pos(',', ...), so such a name would arrive as two, and
the fragments can match real nets: VCC,GND becomes VCC
and GND. With force=True that deletes nets nobody named
and orphans their pads and tracks.
Returns:
Dict with deleted (count removed), skipped_connected
(count), and skipped_nets (names skipped because still
connected). Or {"ok": False, "reason": ...} if a name
contains a comma, in which case nothing is sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nets | No | ||
| force | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||