AnsweredAssumed Answered

swEdrawingSaveAll SaveOption not selecting all sheets for SaveAs

Question asked by Arthur McRae on Aug 27, 2019
Latest reply on Aug 28, 2019 by Arthur McRae

So I'm updating one of our companies macros to save out eDrawing files.  I set the SaveOption to swEdrawingSaveAll as the api documentation says, no errors, but when the macro saves it still has me select what sheets I want saved out.

 

Function FileSave(DIR As String, NAME As String, REV As String, EXT As String)
Dim SaveOption As String
If InStr(UCase(EXT), "E") > 0 Then
' edrawing options: swEdrawingSaveActive, swEdrawingSaveAll, swEdrawingSaveSelected
SaveOption = swEdrawingSaveAll

Else
SaveOption = swSaveAsOptions_Silent
End If
boolstatus(1) = Application.SldWorks.ActiveDoc.Extension.SaveAs(DIR & NAME & REV & EXT, swSaveAsCurrentVersion, SaveOption, Nothing, longstatus, longwarnings)
'Debug.Print "Error: " & longstatus & vbNewLine & "Warning: " & longwarnings
End Function

 

Why is this? As well as what do I need to do to make it actually automatically save all?

 

Also as a secondary question within this can I set the SaveOption to be both swSaveAsOptions_silent & swEdrawingsSaveAll?

Outcomes