Save As Template
save_as_templateSave the active part, assembly or drawing as a template so new documents start from it. Reuse prepared units, materials and custom properties in create_part, create_assembly or create_drawing.
Instructions
Save the active part, assembly or drawing as a template, so new documents start from it.
Use it after setting up a document once (units with set_units, a material,
custom properties) to start the next one the same way: pass the template to
create_part, create_assembly or create_drawing as template. A part
saves as .prtdot, an assembly as .asmdot, a drawing as .drwdot. Give
file_path, or name to save in SolidWorks' first template folder so it also
shows in File > New. Afterwards SolidWorks has the template open in place of
the document, as File > Save As does (a saved document's file is left as last
saved); the reply's warning says so. Save from a part with no features when only its settings should carry
over. The path is checked before SolidWorks is asked: the extension must
match, the folder must exist, and a file already there is kept unless
overwrite is on. Needs: an open, active document. Changes: writes the
template. Returns: data with file_path, document_type,
in_template_folder, template_folders and document_became_template.
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": {
"input_data": "<input_data>"
},
"name": "save_as_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | Yes | `file_path` or `name` (one is required); `overwrite` is off. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||