pcb_get_clearance_violations
Read existing PCB clearance violations already stored on the board, optionally filtered by net, without triggering a DRC run.
Instructions
Read the violations ALREADY on the board, optionally filtered to one net. Does NOT run DRC.
This is a pure board read: it walks the eViolationObject
records the last DRC run (batch or online) left behind. It
opens no dialog and cannot block the bridge. Use it as the
default way to inspect violations.
It used to trigger PCB:DesignRuleCheck first, which raises
Altium's MODAL "Design Rule Checker" setup dialog: on a
241-component board that wedged the whole bridge for 30+ min
until the client timed out. A "get" tool must not do that, so
the trigger is gone. pcb_run_drc(allow_modal=True) is now
the only way to force a fresh run.
CAVEAT -- violation_count: 0 means "no violations are
stored on this board", NOT "the board passes". If DRC has
never been run in this Altium session, there is nothing to
read and the answer is 0 either way. The response carries
drc_triggered: false and a note saying so. To get
fresh data, run DRC from Altium's UI (Tools > Design Rule
Check) or call pcb_run_drc(allow_modal=True) and be ready
to click the dialog.
Filter is substring-matched against the violation's Description and Name, so it catches both "Net USB_DP and Net GND" clearance warnings and net-named via antennas.
Each violation carries x_mils / y_mils / layer for
the agent to navigate to, plus primitive1 / primitive2
objects with {detail, type, net, layer, x_mils, y_mils}.
Args: net: Net name to filter by (substring match). Empty string returns ALL stored violations. offset: How many matching violations to skip, for paging. limit: How many to return, 200 by default.
Returns:
Dict with {violation_count, offset, limit, returned, has_more, drc_triggered, note, violations}.
violation_count is every violation that matched; when
has_more is true, call again with offset raised by
returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||