Enterprise PDM Convert Tree Tweak

Exports out of Enterprise PDM are a common requirement to ensure outside parties are supplied with up-to-date drawings and models for manufacturing and design reviews.  To address this requirement, EPDM added Tasks a few releases ago, allowing a network on connected machines running SolidWorks to perform these tasks easily.   SolidWorks provides the "SWTaskAddin" which enables the common tasks of Converting and Printing documents out of SolidWorks.

There is one major difference between these two tasks besides the fact that one converts files into another format and the other prints them; selecting references.  Baked into the Print task is an option to "Auto-select" files within the reference tree including:

- None

- All drawings

- Parts and sub-assemblies only

- All parts, sub-assemblies, and drawing.

This feature is not part of the Convert task and is commonly requested for creating an export package.  Since this is a current limitation of the SWTaskAddin the only real option was to use the API and build a new task addin that displays that similar reference prompt.  I recently started building this addin and realized how much duplication would be needed just to get this one option so I decided to fiddle first!

Since the SWTaskAddin stores the task settings in the database, it is easy to trick the task to run the UI of one and execute the other.  Here is how you can get the convert task to prompt for references without coding an addin. Before I show the steps there are a few assumptions you have to first understand.

1. The tweaked task cannot have user interactions so you must "Set-it and Forget-it".

2. The reference prompt shows some print options that need to be ignored.

3. I am unsure how resilient this will be to upgrade and or patches (although it should be fine).

Convert Task with References Workaround:

1. Create a conversion task and set all the options like type, location, options etc. (Make sure all options are set to NOT allow users to change since that is part of the Convert UI).

2. Under "Output File Details", click on "Advanced Scripting Options..." and COPY all the highlighted text.

3. Click "OK" to save the task.

4. Reopen the task go back to "Output File Details", click again on "Advanced Scripting Options..." and switch the "Task user interface type:" from "Convert" to "Print".  You will get a prompt to close and reopen the task to let the settings to be loaded.

5. Reopen that task and now go to "Files", click on "Advanced Scripting Options..." removed the highlighted text and PASTE in the script you copied from the task when it was in "Convert" UI.

6. Click "OK" to save the task.

By starting the task as a Convert, all the settings of the convert task are saved into the database after we hit OK. When we go back into the task and switch it to a Print task, all the settings are still stored in the database from the Convert but we have now told the task to show the Print UI.  Replacing the Print task advanced scripting with that of the Convert task allows the print task to execute, using the settings in the database and displaying the reference screen we want from the Print task.

Although I enjoy coding add-ins for this tool, avoiding a lot of duplicate work and staying within the bounds of an out-of-the-box install is always the goal.  Despite the limitations of interaction and the print related interface options, the tweak gets the job done. Enjoy! ~Lou