export_flat_pattern_dxf
Export an active SOLIDWORKS sheet metal flat pattern to DXF, keeping cut outline and holes on layer 0 and bend lines/notes on layer BEND for clean cutting.
Instructions
Export the active sheet metal part's flat pattern as a DXF: outline and holes on layer 0, bend lines and bend notes (text) on their own layer BEND (so a cutting program can leave them out); layer 0 holds only what is cut. Forming tools are not drawn (a dimple leaves only the outline). The file is in the document's length unit (inches from an inch template; the file's $INSUNITS says which) unless dxf_unit asks for mm or inch: then the document's unit is switched for the export and put back. The part must be saved, and an existing file needs overwrite. Returns path, bytes, flat size, dxf_unit (the unit of the file's coordinates), bend_lines and bend_notes (how many are on layer BEND). SolidWorks marks the part modified.
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": {
"filepath": "<filepath>"
},
"name": "export_flat_pattern_dxf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit of the flat size (mm, cm, m, inch or ft) | |
| dxf_unit | No | Unit of the DXF file's coordinates (default: the document's length unit) | |
| filepath | Yes | Where to write it, ending in .dxf | |
| overwrite | No | Replace an existing file |