pcb_lock_net_routing
Locks or unlocks tracks, arcs, and vias on selected nets before autorouting to protect hand-routed power, ground, and clock connections; optionally locks components with pads on those nets.
Instructions
Lock or unlock track / arc / via primitives on a list of nets.
Standard workflow: before letting the autorouter touch the board,
lock the power / ground / clock / oscillator nets so a partial
re-route pass doesn't undo your careful hand-routing on them.
Set lock=False afterwards to free everything up.
Locked primitives have Moveable=False; the autorouter and
the interactive editor respect that flag when DXP Preferences →
PCB Editor → General → "Protect Locked Objects" is enabled.
The net-list-driven MCP equivalent of a cursor-driven lock.
Args:
nets: Net names to lock / unlock (e.g. ["VCC", "GND", "CLK_24M"]). Case-sensitive.
lock: True to lock (sets Moveable=False), False to unlock.
lock_components: Also lock any component with at least one
pad on a matched net. Useful to freeze the connectors /
regulators that anchor a hand-routed power section.
Default False.
Returns:
Dict with:
- locked: True / False mirror of the input
- matched_primitives: track + arc + via objects whose
net matched
- updated_primitives: how many actually changed state
- matched_components: components touched (only filled
when lock_components=True)
- updated_components: components whose Moveable flipped
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lock | Yes | ||
| nets | Yes | ||
| lock_components | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||