proj_get_erc_violations
Retrieve electrical rule check violations from the last ERC run without recompiling. Returns each violation with its related pin, net, or port objects and cross-probe data for locating the exact offender.
Instructions
Return the ERC violation list produced by the last
proj_run_erc() invocation.
Two-step pattern by design: proj_run_erc() performs the
compile-and-check (slow, can be 30+ s on a large project);
this tool reads back the violations cheaply so the agent can
re-query without re-running ERC.
Each violation names the OBJECTS it is about, not just a
category. related_objects carries one entry per offending
object with its kind (Pin, Net, Port), its document, and
a cross_probe string, which is what Altium itself uses to
jump to that exact object and is therefore what identifies the
specific pin or net.
That detail is the difference between a report and something actionable. A category plus a sheet name cannot be acted on: the only safe response to "floating input pin, somewhere on this sheet" is to do nothing, because a NoERC marker placed by guesswork silently suppresses a real disconnection and is worse than the warning it clears.
related_object_count is reported separately, so a violation
that genuinely exposes no objects is distinguishable from one
whose objects could not be read.
Returns:
{"violation_count", "violations": [{"index", "description", "detail", "related_object_count", "related_objects": [{"kind", "document", "cross_probe"}]}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||