cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

I wanted to program a mapkey to save my current file in my current working directory and in a back up file location. Then purge the curent working directory of all but the latest iteration. Can someone help me with that?

nwille
2-Guest

I wanted to program a mapkey to save my current file in my current working directory and in a back up file location. Then purge the curent working directory of all but the latest iteration. Can someone help me with that?

I wanted to program a mapkey to save my current file in my current working directory and in a back up file location.  Then purge the curent working directory of all but the latest iteration.  Can someone help me with that?

8 REPLIES 8

Hi Nate,

Please take a look at the following article:

CS22968 - How to create mapkeys in Creo Parametric

Thanks,

Amit

TimoNurmi
4-Participant
(To:nwille)

This is a bit tricky, in addition to how to create mapkeys you need to know the function of Backup command.

See When selecting Save a Backup, subsequent saves should go to Working Directory

Creating a mapkey that does the things above is not straight forward as the active file & folder will be changed during backup. The solution will also depend on what you would like to do after using the mapkey?

If you use the backup command twice you can accomplish what he wants.  First file > Save As  > Backup to the backup location (backup file becomes the active model), then File > Save As  > Backup to the working directory (working directory model becomes the active model).

I'd encourage him to think through the ramifications of this:

  • Will the backup location always be the same?
  • Are you OK with saving everything to the backup location and then back to the working directory every time?  The backup command dumps everything in the target folder.  That's all assy. components (for assys), all externally referenced models, drawing formats (for drawings), etc.

It's possible, but considering all the possible scenarios and the implications of each is not trivial.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Thanks all!  The back up folder will be the same for every project.  This sequence works but I would like to purge the working directory of all related files (.frm, .drw, .asm, .prt) except for the latest iteration (.frm I wouldn't need at all in either the working directory or the back up folder).  I would be ok with purging every .prt, .asm and .drw of everything but the latest iteration in the working directory.  Is there a way to do that?

jnelson
13-Aquamarine
(To:nwille)

Yes, but your mapkey would have to activate the system command window, then Pause the mapkey. During the Pause in the command window you would most likely need to change to the directory the files are stored in, then run the Purge command, then exit the command window, and then Resume the mapkey...

right now I have it where it does a save as on the back up directory and then a save as on the current working directory.  So I am in the current directory to do the purge.  When I have the command window pop up it won't auto enter "purge" I'm assuming because it is system command window is another program.  If I pause the mapkey can I somehow auto enter "purge", hit enter and close out the system command window?  I don't need to purge the back up directory.  I could make it a daily occurrence like Ben was saying with windows batch file.. wouldn't be 100% ideal but I think that would work for what we are trying to do.

Thanks Again!

BenLoosli
23-Emerald II
(To:nwille)

Can you give us a more detailed idea of what it is you are trying to accomplish?

Mapkey to save to the current working directory and then save to a fixed backup directory should be easy to do.

The purge requirement becomes the hard part as there are no built-in tools for purging. Speaken Purge utility could be run, but like Joel said, triggering it becomes complicated. Would you need to run the purge immediately or could a windows batch file launch the Purge utility daily, after hours?

You can even try to use the GENIUS TOOLS Purge Tool. I am not sure if there is a Batch Mode implemented right now.

http://www.inneo.co.uk/product/genius-tools-purge/?_ga=1.77151765.1079711130.1423473302

A good try will be using QuickAccess - where you can use a lot of variables in your Mapkeys:

GENIUS TOOLS Quick Access Menu for PTC Creo Parametric - INNEO

Top Tags