Export Sch Svg
export_sch_svgExports a KiCad schematic to SVG files, one per page, into a specified output directory. Supports theme, black-and-white, drawing sheet, font, and page options via kicad-cli.
Instructions
Export a schematic to SVG via kicad-cli (sch export svg), one SVG per page into a directory. Exposes drawing-sheet override, theme, black-and-white, exclude-drawing-sheet, default-font, no-background-color, and page selection. schematicPath is REQUIRED.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schematicPath": "<schematicPath>",
"outputDir": "<outputDir>"
},
"name": "export_sch_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Comma list of page numbers to print (blank = all pages) | |
| theme | No | Color theme to use (default: schematic settings) | |
| defineVar | No | Project variable overrides as 'KEY=VALUE' strings | |
| outputDir | Yes | Output directory for the SVG files | |
| defaultFont | No | Default font name | |
| drawingSheet | No | Path to a drawing sheet override | |
| blackAndWhite | No | Black and white only | |
| schematicPath | Yes | Path to the .kicad_sch (required) | |
| noBackgroundColor | No | Avoid setting a background color (regardless of theme) | |
| excludeDrawingSheet | No | No drawing sheet |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |