run_erc
Run Electrical Rules Check (ERC) on a schematic.
Instructions
Run Electrical Rules Check (ERC) on a schematic.
A sub-sheet is checked from its project's root, so the hierarchy around it
counts, and only that sheet's own violations are returned, those of every
use of it under every top-level sheet the project lists. A sheet below a
top-level sheet other than the root is refused when that kicad-cli did not
check it from the root; run_erc on that top-level sheet checks it on its
own. A file that no sheet of its project uses is checked on its own. A run
that makes no report raises and leaves output_dir as it was.
Returns JSON report with violations. An item's position is in
millimetres (mm) in sheet coordinates, the numbers get_pin_positions prints.
The report file saved in output_dir is kicad-cli's own.
Args:
schematic_path: Path to .kicad_sch file. Optional; omit to use the configured default.
output_dir: Directory for report file (default: beside the file ERC runs on).
Optional; omit to use the configured default.
project_path: Path to .kicad_pro file; the project whose hierarchy to look in.
Refused when no sheet of it uses the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_dir | No | ||
| project_path | No | ||
| schematic_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| source | Yes | ||
| violations | Yes | ||
| kicad_version | Yes | ||
| violation_count | Yes |