One of the most common deliverables for companies is a PDF of their SOLIDWORKS drawing. For many people out there, the creation of a PDF is a manual process involving a tedious amount of steps, even for those that have PDM! Let’s add some automation to our PDM workflow to automatically create a PDF of our SOLIDWORKS Drawing! Despite having the Create PDF task already set up within PDM, there are many of us that are left scratching our heads as to why the PDF doesn’t get an updated data card! As a solution to these problems, we will highlight the steps to create a PDF data card, create a PDF task, add the task to our workflow, and link variables from our SLDDRW data card to our new PDF card.
Create a data card for your PDF files. I chose only 3 variables for this example but any variable from the drawing data card could be mapped to the PDF card. After the card is saved into our configuration we can begin to automate.
We’ll now create the PDF task.
Name the task and select SOLIDWORKS task Add-in under the Add-in subsection.
In the Script subsection change the task user interface type to File Conversion. We will then get a warning message that tells us to close and reopen the new task.
After we open our Create PDF task again we’ll work our way through the subsections from the top down. In the Execution Method subsection, select a host machine to run the task. This could be set up to run on a dedicated host machine or set up to run on the machine that originated the task.
The Menu Command subsection allows us to configure the right click menu allowing us to run the task at any time from our vault view. (I have selected to display it in the right click menu, but we’re also going to add it as an action later. Clear the text if you choose not have it in the right click menu.)
In the Conversion Settings subsection, select PDF from the output file drop down, and make the configuration selections that best suites you needs.
The File Card subsection is where we will map our drawing data card variables to our PDF card variables. If you have unique PDF variables just be sure that the variable from the drawing card is mapped to the correct PDF card destination variable.
We’ll now setup the output file path. In this example we’re just saving the PDF back to the same location as the source drawing file.
Assign the correct permissions and setup any success and error notifications before finishing the task.
Add an action to our workflow to launch the task. Remember that we can also use the right click menu to execute the task. (Right click menu found in Step 6) We’re going to apply this action to the transition as our drawing file goes to the ‘Released’ state. We can apply this action to any and as many transitions we choose, just remember that it creates a PDF of the drawing from its current state.
Right click the transition and select properties.
- Select Add Action from the Actions tab
- Apply a description
- Type drop down: select Execute Task.
- In the Select task to execute: drop down we need to select our Task, in this case Create PDF.
- Optional if we don’t want .dwgs or other file types to be converted to PDF we should check the box and specify the file extension on which we want to convert, this case SOLIDWORKS drawings (.slddrw).
*be sure that the PDF action takes place after any set variable actions
Once these steps are complete test out our newly configured automation. You should now be well on your way to having automated PDF generation and accurate linking of properties from the SOLIDWORKS file! See the video below for an example of the task being launched from the right click menu.
Written by Blake Hartje
Blake Hartje is an Engineering Systems Analyst at Alignex, Inc. When Blake isn’t helping customers with SOLIDWORKS or PDM projects, he can be found in the garage tinkering with his hot rods.