Hi there,
When starting an new part, assy or drawing in SW you can save the file and the 'dirty flag' wil be removed, also (off course) the active document gets the name as you saved it.
Now I like to put this in a macro.
When I start a new file and record the 'save procedure' I can't get reproduce this behavior when running the macro.
What am I doing wrong ?
Only thing I want for now is to copy the SW behavior when saving a new file into a macro.
This is what i recorded:
Option Explicit
' ******************************************************************************
' C:\\Users\\Master\\AppData\\Local\\Temp\\swx3476\\Macro1.swb - macro recorded on 09/25/11 by Master
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
longstatus = Part.SaveAs3("C:\\Users\\Master\\Desktop\\Part1.SLDPRT", 0, 2)
End Sub
Thanks in advance,
Greetings !
SolidworksApi macros