|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > CADSystem > SWSave |
Saves the currently opened CAD file
call DBWShell("SWSave [okUpdateLastModifiedFileDate [forceRebuildAll]]")
okUpdateLastModifiedFileDate |
Optional. |
|---|---|
forceRebuildAll |
Optional. •the new parameter can fix some missing preview issues •the new parameter may cause performance issues when passed •the new parameter can work only with the SolidWorks integration (DBWorks) |
Remember to use "|" char (vertical bar) characters instead of blanks in the file name.
In order to fully disable any database update when using the swSave command, the command TrackEvents 0 needs to be invoked before the call (see example below).
Decision flow will be:
if TrackEvents is 1 (default) then swSave invokes events, every DOCUMENT's field will be updated (LAST_MODIFIED_FILE_DATE too).
if TrackEvents is 0
•if swSave 1 (default) then LAST_MODIFIED_FILE_DATE is updated
•if swSave 0 then LAST_MODIFIED_FILE_DATE is not updated
@SWSAVEAS_SOLIDWORKS_ERROR |
the error code number |
|---|---|
@SWSAVEAS_SOLIDWORKS_ERROR_STRING |
the error description |
@SWSAVEAS_SOLIDWORKS_WARNING |
an optional warning code number |
The error and warning code numbers are the same as documented in the swFileSaveError_e and swFileSaveWarning_e Enumerations of the SolidWorks API Help file.
See SWSaveAs command
Example of NO tracking CAD save
DBWShell("TrackEvents 0")
DBWShell("swSave 0")
DBWShell("TrackEvents 1")