AnsweredAssumed Answered

Cycle through open drawings and print

Question asked by William Miller on May 14, 2018
Latest reply on May 14, 2018 by William Miller

Hello all,


I am trying to cycle through all my open drawings and print each one as it comes up. I was following along with some other code, but when I got to actually print the drawing, it just printed the same drawing over and over endlessly. Anyone have any ideas what could be happening? My code is below:


Sub main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
    Set swApp = Application.SldWorks
    Set swModel = swApp.GetFirstDocument
    While Not swModel Is Nothing
        Set swModel = swModel.GetNext
End Sub