Manipulating the "Compare files in EPDM"

A few days ago I demonstrated how to easily compare documents with SOLIDWORKS DrawCompare. Since that date, my Inbox has exploded! Thousands of you want to know if they can use this method with their files inside of SOLIDWORKS Enterprise PDM.

Comparing two separate files within EPDM is easy. Just follow the steps from “Compare images and drawings“.

Comparing two different versions of the same file is a bit harder because EPDM gives you either:


Not much help.

To use EPDM’s “advanced” compare feature, the comparing program either needs to accept arguments on the command line or use its API. DrawCompare has neither.

You need to have a copy of the two version of the file in a location where you can manually load them into DrawCompare. Here is how to make a copy of those versions and place them on your desktop.

For the user/group you want to update, go to their settings, file compare and “add” a compare program. Next choose which extensions you want to compare. I use “dwg,dxf,jpg,bmp,tif,slddrw”.

For the path to the compare program, you cannot simply enter the DOS command COPY because EPDM is expecting a program, not a DOS command. However the program “cmd.exe” will allow you to send the COPY command to it as an argument.

Remember your old DOS command line days?

You could enter this following line into the “path of the compare program” and you would be finished…

c:windowssystem32cmd.exe /C COPY "%1%" "c:userstimdesktop" && COPY "%2%" "c:userstimdesktop"

…as long as your are logged into the computer as “tim” and your cmd.exe program is located in the “windowssystem32” directory. You could certainly go through each user’s settings and ensure you are using the proper file paths, or you could take advantage of environment variables.

You can define your computer’s environment variables through the control panel. However the ones we’ll need (the location of our desktop and the location of the cmd.exe program) are likely already defined. To confirm, go to a DOS prompt and enter the word “SET” and hit enter. You should get a result resembling this image:

Notice the environment variable “ComSpec” is showing where my cmd.exe file is located, and “USERPROFILE” is showing the location of my user profile – and my desktop is a sub directory off of that.

Substituting these environment variables (surrounded by %’s) into the line above, I get:

%ComSpec% /C COPY "%1%" "%USERPROFILE%desktop" && COPY "%2%" "%USERPROFILE%desktop"

I can enter this same line of text for everyone in my company, and their chosen files should be copied to their desktop.

Want to see it in action?


Viava the command line!

  • Share this
Find Your Design Solution in the CATI Store.
Browse Products