SWSave

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > CADSystem >

SWSave

Description

Saves the currently opened CAD file

Syntax

call DBWShell("SWSave [okUpdateLastModifiedFileDate [forceRebuildAll]]")

Parameters

okUpdateLastModifiedFileDate

Optional.
(Default = 1)
If 1 disables the automatic update of the database LAST_MODIFIED_FILE_DATE executed by the command

forceRebuildAll

Optional.
1: forces the rebuild of all the geometry and configurations in the active model
 

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)

Remarks

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

Results

@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 also

See SWSaveAs command

Example

Example of NO tracking CAD save

DBWShell("TrackEvents 0")

DBWShell("swSave 0")
DBWShell("TrackEvents 1")