pcb_apply_via_template
Copies a source via's template link, hole, and diameter onto free vias, optionally filtered by net or current size, to align a board with a Routing Via rule in template mode.
Instructions
Make free vias match a source via: its via template, hole and diameter.
Point at a via that already uses the template you want (set one in Altium's Properties panel if none does), and every other free via, or those matching the filters, takes its template link, mode, hole and diameter. This is how to bring a board in line with a Routing Via rule in template mode. Altium Designer 22 or later.
The template link is copied the way Altium's own FormatCopy script does it. Diameter and hole are read back; the link has no member to read back, so check one via's template in the Properties panel afterwards. Growing vias can create clearance violations: run DRC with the rules enabled.
Args: source_x, source_y: A point on the source via, in mils. net: Only vias on this net. from_size_mils, from_hole_mils: Only vias at this size now. dry_run: Report what would change and change nothing.
Returns:
source (position, size, hole, net), changed, failed,
before/after counted by "diameter/hole" in mils.
Refused with LOCAL_STACK for a source with a per-layer stack
and NO_ANNULAR_RING for a source without a ring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | No | ||
| dry_run | No | ||
| source_x | Yes | ||
| source_y | Yes | ||
| from_hole_mils | No | ||
| from_size_mils | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||