Export Drill
export_drillGenerate PCB drill files and drill maps via kicad-cli, with configurable Excellon/Gerber options for format, origin, units, zero suppression, and separate PTH/NPTH outputs.
Instructions
Generate drill files for a PCB via kicad-cli, exposing the full Excellon/Gerber drill option set (format, drill origin, zero suppression, oval format, units, mirror-Y, minimal header, separate PTH/NPTH files, drill map + map format). Reads the last SAVED state of the .kicad_pcb.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Drill file format (default excellon) | |
| boardPath | No | Path to the .kicad_pcb (default: current board) | |
| mapFormat | No | Drill map format when generateMap is set (default pdf) | |
| outputDir | Yes | Output directory for the drill files | |
| drillOrigin | No | Drill coordinate origin (default absolute) | |
| generateMap | No | Generate a drill map / summary file | |
| excellonUnits | No | Excellon output units (default mm) | |
| excellonMirrorY | No | Mirror the Y axis (Excellon) | |
| gerberPrecision | No | Gerber coordinate precision (5 or 6) when format=gerber | |
| excellonMinHeader | No | Use a minimal Excellon header | |
| excellonOvalFormat | No | Excellon oval hole format (default alternate) | |
| excellonSeparateTh | No | Generate independent files for NPTH and PTH holes | |
| excellonZerosFormat | No | Excellon zero-suppression format (default decimal) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |