Export Pcb Dxf
export_pcb_dxfExport PCB layouts to DXF format with configurable layers, units, and plot options for manufacturing prep or CAD workflows.
Instructions
Plot the PCB layout to DXF via kicad-cli, exposing the full layer-plot option set (layer + common-layer lists, refdes/value exclusion, soldermask subtraction, use-contours, use-drill-origin, border+title, output units, DNP fab-layer modes, drill shape, single/multi output modes). Reads the last SAVED state of the .kicad_pcb.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 | |
| modeMulti | No | Multi output; output path is a directory (GUI-like plotting) | |
| modeSingle | No | Single file; output path is full path; LAYER_LIST controls all layers | |
| outputPath | Yes | Output DXF file path (or directory in multi mode) | |
| outputUnits | No | Output units (default in) | |
| useContours | No | Plot graphic items using their contours | |
| 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 | |
| drillShapeOpt | No | Pad/via drill shape option (0 none, 1 small, 2 actual; default 2) | |
| excludeRefdes | No | Exclude reference designator text | |
| useDrillOrigin | No | Plot using the drill/place file origin | |
| includeBorderTitle | No | Include the border and title block | |
| subtractSoldermask | No | Subtract soldermask from silkscreen | |
| 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 |