12 Replies Latest reply on Feb 26, 2008 8:52 AM by Luke Malpass

    Is there a batch conversion?

    Robert Woods
      I have over a hundred SolidWorks drawings that I need to save as pdf files.
      Is there any way to batch convert these?
      I've done somewhat of a search, and saw that some had suggested to use Task Scheduler to do various tasks.
      Apparently the place I work for did not get that option. At least it's not listed in my program files.
      Thanks so much for your help.
        • Is there a batch conversion?
          Devon Sowell
          Hello Robert-

          The Task Scheduler, look here; see the screenshot below.

          If you find it, Run the Task; Export, .pdf.
            • Is there a batch conversion?
              Charles Culp

              Last spring, someone posted a macro that did this (actually, two people and two macros). I cannot seem to find those threads, however.

              The task scheduler method is great if you have SW Office Premium, for us without it, you will have to find that macro.

              I suggest searching in the API category of these forums, there was a solution that was posted. I'm sorry I can't be of more help; maybe someone else kept a copy. Or even better, the original poster is still around.
            • Is there a batch conversion?
              Robert Woods
              Thanks a bunch guys.
              We don't have the Office Premium, so it looks like I'll get to open and save as a whole bunch of drawings.
              I did find where someone have posted part of a vb file asking for help with a problem, but couldn't find anything more.
              I'll try searching again.
              Thanks for your help.
              • Is there a batch conversion?
                Larry Kutcher
                Take a look here...

                See if this helps out.


                Basically the question was asked:
                Is there a way of selecting a directory in a SolidWorks macro?

                I want the user to select a directory batch open and save a pdf copy to another directory. I can do every thing but the directory part.

                I have done a similar prog in excel with the getfileopen method but SW doesent have this.

                The only option left is to use SW working directory but I don't like this.

                'This module contains all the declarations to use the
                'Windows 95 Shell API to use the browse for folders
                'dialog box. To use the browse for folders dialog box,
                'please call the BrowseForFolders function using the
                'syntax: stringFolderPath=BrowseForFolders(Hwnd,TitleOfDialog)
                'For contacting information, see other module

                Option Explicit

                Public Type BrowseInfo
                hwndOwner As Long
                pIDLRoot As Long
                pszDisplayName As Long
                lpszTitle As Long
                ulFlags As Long
                lpfnCallback As Long
                lParam As Long
                iImage As Long
                End Type

                Public Const BIF_RETURNONLYFSDIRS = 1
                Public Const MAX_PATH = 260

                Public Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
                Public Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
                Public Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
                Public Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long

                Public Function BrowseForFolder(hwndOwner As Long, sPrompt As String) As String

                'declare variables to be used
                Dim iNull As Integer
                Dim lpIDList As Long
                Dim lResult As Long
                Dim sPath As String
                Dim udtBI As BrowseInfo

                'initialise variables
                With udtBI
                .hwndOwner = hwndOwner
                .lpszTitle = lstrcat(sPrompt, "")
                .ulFlags = BIF_RETURNONLYFSDIRS
                End With

                'Call the browse for folder API
                lpIDList = SHBrowseForFolder(udtBI)

                'get the resulting string path
                If lpIDList Then
                sPath = String$(MAX_PATH, 0)
                lResult = SHGetPathFromIDList(lpIDList, sPath)
                Call CoTaskMemFree(lpIDList)
                iNull = InStr(sPath, vbNullChar)
                If iNull Then sPath = Left$(sPath, iNull - 1)
                End If

                'If cancel was pressed, sPath = ""
                BrowseForFolder = sPath

                End Function

                'sample usage in form
                Private Sub cmdServerBrowse_Click()
                txtDatabasePath.Text = BrowseForFolder(me.hwnd, "Please select a Server folder.")
                End Sub
                • Is there a batch conversion?
                  Ben Eadie
                  Google swBatchPrint and you can print to a PDF through Bluebeam in SolidWorks itself.

                  I use SWupBB to save all drawings as PDF automatically (very handy tool)
                  so with this if you could get a macro to open-save-close then the SWupBB would make the PDF's for you


                  P.S. I will work through a method and put it on the wiki at my site soon.
                  • Is there a batch conversion?
                    Larry Kutcher
                    Or here:

                    Batch Export - Export multiple files at once. PDF, JPEG, Print, DWG (relatively new in this application still needs work), change color. This macro requires you change where files are located. Be sure to go through and make changes before executing this macro.

                    • Is there a batch conversion?
                      Stephen Reed
                      We use Bluebeam for batch pdf conversions. We've found it to be a pretty good tool for batch pdf's and also has an included program called Revu that lets you do some basic pdf editing and markup, also very handy. Bluebeam works as a SolidWorks plugin but also installs a pdf printer engine so you can create pdf's from any of your other programs as well. There is a cost involved, however, something like $150 per seat w/volume discounts available.

                      By the way, my understanding is that Bluebeam is no longer the pdf converter used by SolidWorks when doing a save as pdf. Minor point I know but I think they made the switch in SW20006 or SW2007.