save_document
Saves the active SolidWorks document or exports it to a specified file format, with overwrite control and optional versioned saving that preserves the previous file.
Instructions
Saves the active document. With 'path' (e.g. C:\projects\part.SLDPRT, .step, .stl, .pdf...) saves/exports to that file: the format is taken from the extension. When the user has set a projects folder, relative paths are confined to it and missing folders inside it are created. If the target file already exists, overwrite must be True or the save is rejected. new_version=True (no path) saves the document as the next version next to its current file (bracket_v1_base.SLDPRT -> bracket_v2_base.SLDPRT), never overwriting: the open document then becomes the new file and the previous version is kept unchanged. Without path or new_version, the document's own file is overwritten.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "save_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| overwrite | No | ||
| new_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |