lib_export_kicad_footprint
Converts a PCB library footprint into a KiCad .kicad_mod file, handling pad conversion, mils to mm, and y-axis flip for KiCad 6+ designs.
Instructions
Export a PcbLib footprint to a KiCad .kicad_mod file.
Reads the footprint's pads from the active (or named) PCB library and
writes a KiCad 6+ S-expression footprint: one pad each
(designator -> number, position, size, shape, drill, layer set).
Through-hole pads (hole > 0) get a drill and the all-copper layer set;
SMD pads get the side's Cu/Paste/Mask set. Altium mils convert to mm
and the y axis is flipped (Altium y-up -> KiCad y-down). This is the
footprint counterpart to lib_export_kicad_symbol.
Args: footprint_name: Footprint to export. If empty, exports the library's current footprint. output_path: Destination .kicad_mod file. Defaults to workspace/.kicad_mod.
Returns: {"output_path", "footprint", "pad_count"} or an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | No | ||
| footprint_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||