SWSaveAs

<< Click to Display Table of Contents >>

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

SWSaveAs

Description

Saves with a specified name the currently opened SolidWorks file.

Syntax

call DBWShell("SWSaveAs NewFile [SaveAsCopy[PDFExportInColor[PDFExportEmbedFonts[PDFExportHighQuality[PDFExportPrintHeaderFooter[PDFExportUseCurrentPrintLineWeights[SaveAs3DPDF[EDrawingSaveAllSheets]]]]]]]]" )

Parameters

NewFile

Full path of a new SolidWorks file.

SaveAsCopy

Optional.
[0/1]
If 1, the command ‘save as copy’ the currently activated SW document.

PDFExportInColor

Optional.
[0/1]
(default 0); If 1 and the NewFile is a .PDF file, a color PDF is created

PDFExportEmbedFonts

Optional.
[0/1]
(default 1) If 1 and the NewFile is a .PDF file, the PDF is created with the fonts embedded in it.

PDFExportHighQuality

Optional.
[0/1]
(default 1) If 1 and the NewFile is a .PDF file, the PDF is created in high quality for drawing documents.

PDFExportPrintHeaderFooter

Optional.
[0/1]
(default 0) If 1 and the NewFile is a .PDF file, the header and footer specified in SolidWorks->File->Print->Header Footer are used when creating the PDF.

PDFExportUseCurrentPrintLineWeights

Optional.
[0/1]
(default 0) If 1 and the NewFile is a .PDF file, the default printer line weights are used when creating the PDF.

SaveAs3DPDF

Optional.
[0/1]
(default 0) If 1 and the NewFile is a .PDF file, a 3D PDF is created

EDrawingSaveAllSheets

Optional.
[0/1]
(default 0) If 1 saves all the sheets of the drawing when exporting to .EDRW eDrawings format

Remarks

Please note the use of "|" (vertical bar) characters instead of blanks in the file name.

the swSaveAs is used by the OnCreateMasterDrawing.lst for creating the initial PDF for the Master Drawing Mode.

The OnCreateMasterDrawing.lst may be adapted for adding/removing the new PDF parameters added to the swSaveAs command

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 SWSave command

Example

Sub main()

 DBWShell("SWSaveAs C:\temp\PDFtest.PDF 0 0 0 1 0 1 0")
End Sub