lib_add_footprint_pads
Add multiple pads to the current footprint in one call, with mil or mm units, to avoid repetitive single-pad edits and save cycles.
Instructions
Add MANY pads to the current footprint in ONE call.
PREFER THIS over looping lib_add_footprint_pad. A 64-pad QFP
built one pad at a time is 64 LLM turns and 64
PreProcess/PostProcess+save cycles; with this tool it's one turn,
one PreProcess/PostProcess, one save. Pad coords are NOT snapped
to a grid (footprints use fine pitches like 50 mils / 0.5 mm).
Args: pads: List of pad dicts, each with: - designator (str, required) -- e.g. "1", "2", "A1" - x, y (int, mils), pad centre - x_size, y_size (int, mils, default 60) - hole_size (int, mils, default 0 = SMD) - shape (str, default "rectangular"), one of round / rectangular / octagonal / roundrect (modern IPC rounded-rectangle SMD). Oval = round with x_size!=y_size. - corner_radius (int %, default 25) for shape="roundrect" - rotation (float deg, default 0) - layer (str, default "TopLayer"). Only used for SMD pads (hole_size=0); a drilled pad is forced through-hole (MultiLayer). Use "BottomLayer" for bottom-side SMD. Optional, written only when given: - hole_length (slot length, above hole_size: a slotted hole hole_size wide, along the pad's X before rotation) - plated (false: a non-plated hole) - paste_expansion, mask_expansion (a manual expansion that overrides the design rule; minus the larger pad side closes the paste opening) The reply counts them (slots, unplated, expansions) and any write this Altium build refused (property_failures).
Example, a 4-pad 0402 + corner pad in one call: lib_add_footprint_pads(pads=[ {"designator": "1", "x": -25, "y": 0, "x_size": 30, "y_size": 40}, {"designator": "2", "x": 25, "y": 0, "x_size": 30, "y_size": 40}, ])
footprint_name picks the footprint to write into. Empty uses
the editor's current footprint; a name makes that footprint
current first and refuses if it cannot, since otherwise the
primitives land in whichever footprint another call left current.
units is "mil" (default) or "mm" for every pad in the call:
one land pattern, one unit, so half a footprint cannot be drawn
in the wrong one. Millimetres are kept exact.
Returns: Dict with added, failed, total counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pads | Yes | ||
| units | No | mil | |
| footprint_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||