save_active_document
Save the active SolidWorks document silently without dialog boxes. Returns file details and error status; works only for documents with an existing filename.
Instructions
Guardar el documento activo de SolidWorks (pieza, ensamble o dibujo).
Guarda en silencio (sin abrir cuadros de diálogo). Equivalente a Ctrl+S en SW. Solo funciona si el documento ya tiene un nombre de archivo asignado — para guardar una pieza recién creada usa save_as. [en: Save the currently active document silently (no UI dialogs). Equivalent to Ctrl+S. Only works if the document already has a filename — for a fresh, never-saved document use save_as.]
Returns a dict with:
name: document title
path: filesystem path of the saved document
saved: True if save succeeded
errors: bitmask of swFileSaveError_e codes (0 if none)
warnings: bitmask of swFileSaveWarning_e codes (0 if none)
Raises:
SolidWorksError if no document is active.
SolidWorksError if the active document has never been saved (no filename). The user must File → Save As in SW first to set a target filename — we don't pop dialogs from this tool. Or call save_as(path) below to set the filename programmatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||