pcb_set_via_soldermask_relief
Sets solder mask relief around via barrels by applying a from-hole-edge expansion to every via or a specified net, then verifies the stored value on both sides.
Instructions
Open the solder mask round each via's barrel, measured from the hole edge, on both sides.
Every via, or those on net, gets its mask expansion set as a
manual value with "from hole edge" on, so the opening is the hole
plus expansion_mils all round. Both sides are written: a via
stores a bottom value even while its sides are linked, and that
value takes effect if they are ever unlinked. Each via is read
back, and vias_verified counts those holding the value.
WRITTEN THROUGH THE VIA'S PAD CACHE. Assigning the expansion straight onto a via crashes Altium's scripting engine (an access violation in ScriptingSystem.DLL, measured on AD 26.10); the same value written into the cache a via shares with pads takes and reads back, so the handler only ever uses that route.
A Solder Mask Expansion rule scoped IsVia is the alternative
that also covers vias placed later:
pcb_create_design_rule(rule_type="solder_mask_expansion", scope="IsVia", value=<mils>).
Args: expansion_mils: Mask expansion from the hole edge, in mils. Default 4. net: Only vias on this net. Empty means every via.
Returns:
vias_matched, vias_verified, expansion_mils,
net, from_hole_edge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | No | ||
| expansion_mils | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||