Export Pcb Svg
export_pcb_svgExport PCB layouts to SVG with full control over layers, mirroring, and plot options via kicad-cli. Generate high-fidelity board renders for documentation and review.
Instructions
Plot the PCB layout to SVG via kicad-cli, exposing the full layer-plot option set (layer + common-layer lists, mirror, soldermask subtraction, negative, black-and-white, theme, DNP fab-layer modes, page-size mode, fit-page-to-board, exclude-drawing-sheet, drill shape, single/multi output modes). Rich CLI sibling of export_svg. Reads the last SAVED state of the .kicad_pcb.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| theme | No | Color theme to use (default: PCB editor settings) | |
| layers | No | Layers to plot, untranslated names e.g. ['F.Cu','B.Cu','Edge.Cuts'] | |
| mirror | No | Mirror the board (to show bottom layers) | |
| negative | No | Plot as negative | |
| 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 SVG file path (or directory in multi mode) | |
| commonLayers | No | Layers to include on every plot (e.g. ['Edge.Cuts']) | |
| drawingSheet | No | Path to a drawing sheet override | |
| pageSizeMode | No | Page sizing mode (0 frame+title block, 1 current page size, 2 board area only) | |
| blackAndWhite | No | Black and white only | |
| drillShapeOpt | No | Pad/via drill shape option (0 none, 1 small, 2 actual; default 2) | |
| fitPageToBoard | No | Fit the page to the board | |
| subtractSoldermask | No | Subtract soldermask from silkscreen | |
| excludeDrawingSheet | No | No drawing sheet | |
| 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 |