How to Roll Back a Revision in SolidWorks Enterprise PDM
Workflows in SolidWorks Enterprise PDM (EPDM) are designed to be pretty linear. Files start in the initial state in your workflow, cycle through your company’s approval process and end up in the released/approved sate at the end, where they are usually assigned a revision letter or number. Then if you want to make a new revision, you have a transition to jump the file back to the initial state and the process repeats all over again with the revision always incrementing each time.
But what happens if there was a mistake and something got released/approved that shouldn’t have been? How do you correct the problem and get back to the previous revision (including the previous revision letter)?
One way to do it is using the “Rollback” command. You just right click on the file in Explorer View and select History. Then in the History window, select the version you want to revert to (1) and hit Rollback (2).
You’ll get a warning dialog and if you click “OK” the file then rolls back to selected version and all versions created before the selected entry are removed.
This is a very slick feature, but it does have a few drawbacks. One is you lose everything that occurred after the version you reverted to including the files and the history trails. If you look closely at my screenshot, you’ll also notice there is a drawing associated with the part file but only the part is going to be rolled back; the rollback command can only be run on individual files and it doesn’t roll back reference files. Finally, if I were to roll back the file in my example to Rev B and then later increment the revision again, it won’t go to Rev C but go to Rev D instead. This is because the increment revision command does not take into account a roll back action in the workflow and it skips the revision counter you rolled back from.
A different workaround (I’m not going to say better) is to put a special transition in your workflow that decrements the revision. Here is how you do it. As you can see, I have a very basic workflow:
The first thing I do is add a new transition called “Admin Rollback” going from my Released state (where the revision gets incremented) back to the initial state in my workflow.
On the permissions tab, I only give the Admin account permissions to run this transition (you can select other users instead, but I strongly recommend only giving one or two people access at the most):
On the Actions tab, add a “set variable” Transaction Action as shown.
Then add a “Inc. Revsion” type Transaction Action.
Save everything, then back in the workflow select the state your transitioning to and go to the Revision Numbers tab. You should see your revision component and in the “Increment by…” column, enter “-1” and save your change.
Save your workflow, and you should be ready to roll something back. To do so, log into the vault with the correct account, find a file or assembly in the released state, right click on it and select Change State>Admin Rollback.
A few words of caution. I can use a negative value in my example because in this case it’s the initial state. New files entering the vault will not have a revision value so this is permissible. If you are rolling back to a different state, you should contact CAPINC tech support for assistance.
Also, only people who know what they are doing should use either a Rollback transition or the Rollback command, so make sure you restrict user access to administrators.
Finally, before using either option in a production environment, try them out in your sandbox vault to familiarize yourself with them.
***
Jay Thompson is an Applications Engineer at CAPINC, a SolidWorks Value Added Reseller with locations across New England. He is a regular contributor to their CAPINC University blog.