AnsweredAssumed Answered

Modify output path in Office to PDF task

Question asked by Shane Suffolk on Jan 10, 2017
Latest reply on Jan 11, 2017 by Shane Suffolk

Hello all,


For our Solidworks files, we currently use a modified Convert task to save the PDFs to a different folder than the native file by altering the Advanced Scripting Options in that task, according to S-046146 in the KB.


In short, this revolves around adding the following line into the Advanced Scripting Options in the Convert task:

convFileName = Replace (convFileName, "portion of the native file path", "portion of the destination file path")


As I've recently upgraded PDM to 2017 SP1 to make use of the handy Office to PDF task, I'm hoping to modification this Office task in a similar way. Unfortunately my coding skills are basically non-existent.


So, is there someone out there that can help me to modify the Office to PDF task to create the equivalent?


PS. Using the standard functionality in the output folder in the Office task isn't working in this case as our folder structure only differs slightly as per the following:

Native files is located in FolderA\FolderB\FolderC and the PDF should go to FolderA\FolderX\FolderC. This is why I like to code something to modify the output path by replacing FolderB with FolderX.