2 Replies Latest reply on Dec 22, 2015 11:28 AM by Bruce Perry

    Windows drop down

    Bruce Perry

      I once wrote a program that used the windows files listed in the windows drop-down where you have file, edit, and help.

      Using the files open gives me the list of all files open that includes the background files. If I open an assembly this can be huge.

       

      Just looking for a way to debug.print; just the windows drop down list.

       

      Thanks for your help.

        • Re: Windows drop down
          Bruce Perry

          I found the following code for Excel that does what I want. I'm just looking for the right syntax for it to work in solidworks.

           

          Sub ListWindows()
          'This code prints in the debug window each window in the list.
          Dim wn As Sw
          Dim wn As Excel.Window
          For Each wn In Application.Windows
              Debug.Print wn.Caption
          Next wn

          End Sub

            • Re: Windows drop down
              Bruce Perry

              Correction I was trying it out and deleted some text. This is the code:

               

              Sub ListWindows()

              'This code prints in the debug window each window in the list.

              Dim wn As Excel.Window

              For Each wn In Application.Windows

                  Debug.Print wn.Caption

              Next wn

              End Sub