ipc_add_tracks
Add straight tracks and through vias on one net of the board in the PCB editor.
Instructions
Add straight tracks and through vias on one net of the board in the PCB editor.
KiCad adds the items in one undo step. The sizes come from the netclass of the net, or from the arguments (the router of the PCB editor uses the sizes that the user selected in the editor, which can be other sizes). KiCad checks no clearance: the answer tells the user to run DRC. The tool refuses a net that the board does not have. KiCad 10.0.6 must have the schematic editor closed (KiCad bug #24966).
When the running KiCad has the limit free_via (ipc_status), each via must be at an end of a new track of the same call: an other via gives an error. A track with the same start and end, and a via drill that is not smaller than the via size, give an error. After an error, the tool changed nothing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"board_path": "<board_path>",
"net": "<net>"
},
"name": "ipc_add_tracks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | Yes | The name of the net, for example "GND" or "/SDA" (case-sensitive). | |
| vias | No | The positions of the through vias (mm). | |
| tracks | No | The tracks: start, end (mm) and copper layer of each one. | |
| width_mm | No | The track width. Default: the track width of the netclass. | |
| board_path | Yes | The path of the .kicad_pcb file that is open in the PCB editor. | |
| via_size_mm | No | The via diameter. Default: the via size of the netclass. | |
| via_drill_mm | No | The via drill. Default: the via drill of the netclass. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |