Export Gerbers
export_gerbersGenerate manufacturing-ready Gerber files from a saved KiCad PCB using kicad-cli, with full control over plot options such as X2 format, netlist attributes, and soldermask handling.
Instructions
Plot Gerber files for a PCB via kicad-cli, exposing the full Plot-dialog option set (X2, netlist attributes, DNP handling, soldermask subtraction, precision, drill-file origin, stored board plot settings, etc). Reads the board from disk, so it reflects the last SAVED state of the .kicad_pcb.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noX2 | No | Do not use the extended X2 Gerber format | |
| layers | No | Layers to plot, untranslated names e.g. ['F.Cu','B.Cu','Edge.Cuts'] | |
| boardPath | No | Path to the .kicad_pcb (default: current board) | |
| defineVar | No | Project variable overrides as 'KEY=VALUE' strings | |
| noNetlist | No | Do not generate netlist attributes | |
| outputDir | Yes | Output directory for the Gerber files | |
| precision | No | Gerber coordinate precision: 5 or 6 (default 6) | |
| noProtelExt | No | Use KiCad Gerber file extensions instead of Protel | |
| commonLayers | No | Layers to include on every plot (e.g. ['Edge.Cuts']) | |
| drawingSheet | No | Path to a drawing sheet override | |
| excludeValue | No | Exclude value text | |
| excludeRefdes | No | Exclude reference designator text | |
| boardPlotParams | No | Use the Gerber plot settings already stored in the board file | |
| includeBorderTitle | No | Include border and title block | |
| subtractSoldermask | No | Subtract soldermask from silkscreen | |
| useDrillFileOrigin | No | Use the drill/place file origin | |
| disableApertureMacros | No | Disable aperture macros | |
| sketchPadsOnFabLayers | No | Draw pad outlines and numbers on fab layers | |
| hideDnpFootprintsOnFabLayers | No | Don't plot DNP footprint text/graphics on fab layers | |
| sketchDnpFootprintsOnFabLayers | No | Plot DNP footprints in sketch mode on fab layers | |
| crossoutDnpFootprintsOnFabLayers | No | Plot an 'X' over DNP footprint courtyards and strike out their refdes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |