SolidWorks Save Drawing As Copy
Save a copy of a SolidWorks drawing to a new path using the Copy flag, so the original document remains unaffected.
Prerequisites
- SolidWorks 2024+ with SwpilotCLI add-in installed
- .NET 8+ Runtime on the system
- A valid
.slddrwsource file path
What this Skill does
- Opens the source drawing silently (or reuses it if already open)
- Calls
SaveAs3withswSaveAsOptions_Copy | swSaveAsOptions_Silent - The original document path is NOT changed — the file stays open as-is
- Reports output file size on success
Quick start
dotnet run --project ./sup_tools/swpilotcli-save-drawing-as-copy/scripts/SaveDrawingAsCopy/SaveDrawingAsCopy.csproj -- "C:\source\drawing.slddrw" "C:\output\drawingAA.slddrw"
Return codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Missing arguments or general error |
| 2 | Cannot connect to SolidWorks |
| 4 | Cannot open source file |
| 5 | SaveAs3 failed |
Notes
- Only supports
.slddrwoutput format - For other formats (PDF, DWG, etc.) use
swpilotcli-save-drawing-asinstead