lib_add_footprint_pad
Adds a pad to a named or current PCB footprint, specifying designator, position, size, shape, drill hole, layer, and rotation.
Instructions
Add a pad to a footprint: the named one, or the current one.
Args:
designator: Pad designator (e.g., "1", "2")
x: X coordinate in mils
y: Y coordinate in mils
x_size: Pad X size (default 60 mil)
y_size: Pad Y size (default 60 mil)
hole_size: Drill hole size (0 for SMD). A drilled pad
is forced through-hole (MultiLayer); a hole-less pad is
SMD on layer.
shape: Pad shape -- "round", "rectangular", "octagonal", or
"roundrect" (rounded-rectangle, the modern IPC SMD
default). An oval/obround is "round" with x_size != y_size.
layer: Layer for an SMD pad ("TopLayer"/"BottomLayer"); ignored
for through-hole pads (always MultiLayer).
rotation: Pad rotation in degrees
corner_radius: Corner radius percentage for shape="roundrect"
(Altium stores RR radius as a %; 25 is typical).
footprint_name: 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: "mil" (default) or "mm", for every length and
coordinate here. Millimetres are kept exact: 1.625 mm
used to arrive as 64 mil and read back as 1.6256 mm.
Returns: Dictionary confirming pad addition
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| layer | No | TopLayer | |
| shape | No | rectangular | |
| units | No | mil | |
| x_size | No | ||
| y_size | No | ||
| rotation | No | ||
| hole_size | No | ||
| designator | Yes | ||
| corner_radius | No | ||
| footprint_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||