mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-08 04:44:13 +02:00
Add DXF export from the command line (--export-dxf)
qelectrotech --export-dxf <project.qet> <output_dir> [--show-terminals] writes one DXF per folio, named <NN>_<title>.dxf like the PNG and SVG exports. Discussion #1072. The DXF code moves out of ExportDialog into DxfExport, unchanged except that its options come from an ExportProperties argument instead of the dialog. The dialog and the command line both call it, and the command line uses the dialog's default options (the preferences' export settings), so both write the same entities. - Createdxf answers a file it cannot open with a message box and exit(0); the command line checks the file first and fails with a message and exit code 1 instead. - A note is printed when pictures become outline boxes, as the dialog warns. - Scripting: qet.exportDxf(outDir, showTerminals). MCP: format "dxf". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G2d2Zi8BfrYRPX88zhaoFG
This commit is contained in:
@@ -33,7 +33,7 @@ here read the model.
|
||||
| `qet_diff` | **what an edit actually changed** — element moves, adds, removes, relabels; conductor changes; and folio fields, texts, shapes, images, symbol text fields and terminal strips |
|
||||
| `qet_scan` | sweep a directory of projects, counting nodes carrying an attribute |
|
||||
| `qet_element_info` | a `.elmt`: translated names, terminals, info fields, part counts |
|
||||
| `qet_export` | run a headless export (pdf, png, svg, bom, cables, wires, wiring, nets, links, info) |
|
||||
| `qet_export` | run a headless export (pdf, png, svg, dxf, bom, cables, wires, wiring, nets, links, info) |
|
||||
| `qet_edit` | **change a project** — place, move, rotate, label, wire, number, cross-reference, add text, shapes and images, restyle a symbol's text fields, delete; then diff the result |
|
||||
| `qet_element_build` | **author a `.elmt`** — draw a new symbol, with terminals to wire it by |
|
||||
| `qet_project_new` | **start from nothing** — an empty project with a title and folios |
|
||||
|
||||
@@ -69,6 +69,7 @@ EXPORT_FORMATS = {
|
||||
"pdf": "--export-pdf",
|
||||
"png": "--export-png",
|
||||
"svg": "--export-svg",
|
||||
"dxf": "--export-dxf",
|
||||
"bom": "--export-bom",
|
||||
"cables": "--export-cables",
|
||||
"wires": "--export-wires",
|
||||
@@ -2186,7 +2187,7 @@ TOOLS = [
|
||||
},
|
||||
{
|
||||
"name": "qet_export",
|
||||
"description": "Run a QElectroTech export headlessly (pdf, png, svg, bom, "
|
||||
"description": "Run a QElectroTech export headlessly (pdf, png, svg, dxf, bom, "
|
||||
"cables, wires, wiring, nets, links, info). Launches the "
|
||||
"binary in an isolated sandbox so it cannot be captured by, "
|
||||
"or capture, a running QElectroTech.",
|
||||
|
||||
Reference in New Issue
Block a user