Add PCB pad primitives to an existing PcbDoc.
The sample creates a rectangular board outline, sets the origin to the lower-left outline corner, and places surface-mount pads, bottom-side pads, rounded rectangles, plated through-hole pads, a plated slot, and a non-plated through hole with explicit zero solder-mask and paste-mask expansion.
AltiumPcbDoc.from_file(...)AltiumPcbDoc.set_outline_rectangle_mils(...)AltiumPcbDoc.add_pad(...)PadShapeandPcbLayer- Slotted holes through
slot_length_milsandslot_rotation_degrees - Manual mask expansion through
solder_mask_expansion_milsandpaste_mask_expansion_mils AltiumPcbDoc.save(...)
From the repository root:
uv run python examples\pcbdoc_add_pad\pcbdoc_add_pad.pyexamples/pcbdoc_add_pad/output/pcbdoc_add_pad.PcbDoc