3 Replies Latest reply on Apr 22, 2016 5:32 AM by John Power

    Pull revision from Workflow on auto PDF task

    John Power

      Hi guys,


      Just wondering if there's a way in SW PDM to bring the revision number into my auto generated PDF on released state. 

      For example i'm working with Revision 1B and then push it to approved state where it becomes Revision 1 and will automatically generate a PDF using a task in the background.


      Is it possible to push the 'Revision 1' into my PDF name somehow with the inbuilt functionality or do I have to use API and pull the name from SQL somehow


      Any suggestions would be much appreciated



        • Re: Pull revision from Workflow on auto PDF task
          Prasad Bhonsule

          Hello John, are you using the standard Convert Task in SW PDM? If so, check under Output File Details, and in the file name option, select source file revision. See my example below:



          So if my drawing file that I was approving was named Draw1.SLDDRW, and upon approving went to Revision "A", the auto-generated PDF would be named as Draw1-A.PDF


          Hope this helps.


          Kind regards,



          • Re: Pull revision from Workflow on auto PDF task
            Wayne Marshall

            Hi John,


            Further to Prasad's advice it may be worth clarifying that the 'Source File Revision' shown above, is the Revision information displayed on the Version Tab, not the DataCard (although this could be the same). This may not be an issue in your case, but for anybody else reading this, it means that if you are creating your PDF as part of a Workflow Transition, then that Transition will need to have an 'Inc Revision' action in there (and the destination State a Revision Counter) to ensure that the database is classing the version of the file you are publishing as a Revision. If you were to manually trigger the task on a file in (for example) a "Work In  Progress" State, then this version of the file would unlikely be classed as a 'Revision' in the database (the version Tab would say "Local revision: No revision" and the file name of your PDF would simply be Draw1-.PDF.


            There is a way of creating a Custom 'Advanced' script to read a variable from the DataCard and you can find the details on how to o this via the KnowledgeBase if you search for Solution ID S-054527: "Is it possible to use a variable value from the data card of the source file in the output file name when using a SOLIDWORKS Enterprise PDM Convert task?". Obviously back up the original script first!.




            Wayne Marshall

            Customer Support Manager

            Solid Solutions Management (UK)

            • Re: Pull revision from Workflow on auto PDF task
              John Power

              Hi Prasad,


              Thanks so much, I really appreciate the fast response - that was the functionality I was looking for.


              Also thank you Wayne for the extra input, isn't that the purpose of ticking "Create a reference from the destination file to the source file"? I assumed that option had similar capabilities as "Paste as reference" but wasn't sure how it would register in the Database but thank you for pointing me to that KB S-054527, I'll definitely look into their suggestions just out of general curiosity.


              Best regards,