I am trying to do a SaveAs on a drawing without saving any referenced files. The Macro below works for that but it pops up a dialog box prompting to save the part, which needs to be canceled. Is there a way to Cancel the dialog through the API?
Option Explicit
Dim swApp As Object
Dim swModel As ModelDoc2
Dim Part As ModelDocExtension
Dim bool As Boolean
Dim fileNamePath As String
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set Part = swModel.Extension
fileNamePath = "K:\Engineering\ALC\CONFIGURATOR\TestSave3-1.SLDDRW"
bool = Part.SaveAs(fileNamePath, swSaveAsCurrentVersion, (swSaveAsOptions_Copy & swSaveAsOptions_Silent), Nothing, 0, 0)
End Sub
SolidworksApi macros