gx3_ladder_export_svg
Export GX Works3 ladder diagrams as SVG files or text for viewing and documentation, with optional device and position-range filters.
Instructions
Export a GX Works3 ladder diagram as an SVG image for viewing or documents. Use this when asked to draw a ladder, export SVG, or save a ladder image. Equivalent CLI: gx3-cli ladder-export-svg PROGRAM --root PROJECT -o ladder.svg. Uses the same renderer as ladder-layout --format svg. Pass 'output' to save under GX3_MCP_OUTPUT_DIR; otherwise returns SVG text (large output spills to a file). Filter with 'device' or 'pos_range'. For TXT diagrams use gx3_ladder_print; for coordinate JSON use gx3_run_command with command='ladder-layout'.
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": {
"program": "<program>",
"root": "<root>"
},
"name": "gx3_ladder_export_svg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | Extracted project folder. For a .gx3 archive, keep it inside GX3_MCP_OUTPUT_DIR so its extraction cache stays inside the output boundary. | |
| device | No | Only rungs referencing this device in any role. | |
| output | No | Optional SVG file (-o). Relative to GX3_MCP_OUTPUT_DIR; absolute paths must stay inside it. Parent dirs are created. | |
| program | Yes | Program/POU name or LDDB file name, e.g. 001_LDDB.db. | |
| pos_range | No | Only rows whose internal pos is within A-B (inclusive); not necessarily GX Works3 step numbers. |