I'm having trouble using the macro recorder, after it's recorded and played back, it only performs half of the recorded macro.
The "Save As" portion never completes.
Any help would be much appreciated.
Here is what I recorded:
Partial Class SolidWorksMacro
Public Sub main()
Dim swDoc As ModelDoc2 = Nothing
Dim swPart As PartDoc = Nothing
Dim swDrawing As DrawingDoc = Nothing
Dim swAssembly As AssemblyDoc = Nothing
Dim boolstatus As Boolean = False
Dim longstatus As Integer = 0
Dim longwarnings As Integer = 0
swDoc = CType(swApp.NewDocument("P:\templates\Assmebly.asmdot", 0, 0, 0), ModelDoc2)
swApp.ActivateDoc2("Assem1", False, longstatus)
Dim myModelView As ModelView = Nothing
myModelView = CType(swDoc.ActiveView, ModelView)
myModelView.FramState = CType(swWindowState_e.swWindowMaximized, Integer)
longstatus = swDoc.SaveAs3("C:\Users\User1\Desktop\1234.SLDASM", 0, 2)
''' The SldWorks swApp variable is pre-assigned for you.
Public swApp As SldWorks