Skip to main content
1-Visitor
March 29, 2017
Question

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?

  • March 29, 2017
  • 4 replies
  • 5295 views

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?

4 replies

18-Opal
March 29, 2017

Hi Nate,

Please take a look at the following article:

CS22968 - How to create mapkeys in Creo Parametric

Thanks,

Amit

1-Visitor
March 30, 2017

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?

21-Topaz II
March 30, 2017

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.

nwille1-VisitorAuthor
1-Visitor
March 30, 2017

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?

23-Emerald III
March 30, 2017

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?

12-Amethyst
March 31, 2017

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