Manipulating the “Compare files in EPDM”

December 17th, 2012


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:

or:

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:\windows\system32\cmd.exe /C COPY "%1%" "c:\users\tim\desktop" && COPY "%2%" "c:\users\tim\desktop"

…as long as your are logged into the computer as “tim” and your cmd.exe program is located in the “windows\system32″ 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?

YouTube Preview Image

Viava the command line!

Jeff Sweeney

CSWE Engineering Data Specialist 3DVision Technologies

Tags: , , , , ,

Loading Facebook Comments ...

5 Responses to “Manipulating the “Compare files in EPDM””

  1. Billy Bob says:

    Are there any ways to compare two dwgs?? Or any free compare programs?
    That would be great !

    Bb

  2. Jeff Sweeney says:

    Check out last week’s blog: http://www.3dvision.com/wordpress/2012/12/12/compare-images-and-drawings/

    It is pretty much the same procedure, except after you get the dwgs in a temporary location, make temporary SolidWorks drawings and compare those.

  3. Billy Bob says:

    Ah i see thanks
    Shame you have to go to the bother of making sldworks drawings first though

  4. Jeff Sweeney says:

    I really hope that SW adds more functionality to DrawCompare, it has the start of being a great little app.

  5. Ben says:

    Hi Jeff,
    The Manipulating the “Compare files in EPDM” post you posted is excellent, it worked straight up, good job thanks.
    just one question, can this be done with multiple sheet drawings?
    when i tried i just got one version with the 1st sheet, and the 2nd file with the 2nd sheet, (i think the versions were checked in with these sheets selected)

    thanks,
    any help would be much appreciated.

    Ben.

Leave a Reply

Follow
Get every new post delivered to your inbox
Join other followers
Powered By WPFruits.com
Bear