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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Repeatable Mapkey Generator - How to loop Creo Mapkey

No ratings

Hi folks, I have created for you: REPEATABLE MAPKEY GENERATOR 

By default, the program generates the Repeatable Mapkey code from the list.
The Repeatable Mapkey Generator uses the existing Mapkey "4k". The Mapkey "4k" is user-defined and is repeated on every object from the list.

Please do not forget to set the Close window at the end of your user-defined Mapkey, because Creo is limited that only 15 active windows are allowed to use.

How it works:

Comments

@VladimirPalffy Awesome utility! You can trim the mapkey code as several of the lines aren't needed:

 

mapkey rm @MAPKEY_NAMEGenerates custom Creo Mapkey;@MAPKEY_LABELRepeatable Mapkey;\
mapkey(continued) ~ Command `ProCmdModelOpen`;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`;\
mapkey(continued) ~ Input `file_open` `Inputname` `TEST.PRT`;\
mapkey(continued) ~ Update `file_open` `Inputname` `TEST.PRT`;\
mapkey(continued) ~ Activate `file_open` `Inputname`;\
mapkey(continued) ~ Activate `out_of_date_annots` `psh_continue`;\
mapkey(continued) ~ Activate `storage_conflicts` `OK_PushButton`;%4k;

 

Some other ideas/suggestions:

  • Automatically clicking ok to PDM storage conflicts (~ Activate `storage_conflicts` `OK_PushButton`;) could be risky. In the current state, the user could set the config option dm_checkout_on_the_fly to handle this. Could add a note on the webpage about this setting or maybe add some PDM options to 'check out' or 'continue' for all conflicts? Maybe it's simplest to just mention the setting.
    • Code for 'Continue':
      • ~ Activate `storage_conflicts` `Resol3`;\
        ~ Activate `storage_conflicts` `OK_PushButton`;\
    • Code for Check out:
      • ~ Activate `storage_conflicts` `Resol1`;\
        ~ Activate `storage_conflicts` `OK_PushButton`;\
  • Could add an text input option to the webpage about what mapkey(s) to run instead of being hardcoded to %4k.
  • Could add an option to add the close window command after running the mapkey(s): ~ Command `ProCmdWinCloseGroup`;\
  • Cleanup of the input list of parts if there's multiples of the same file  - test.prt.1 and test.prt.2

Nice work!

Hi @lhoogeveen , thank you very much for your comments.

I am very new in programming - I have used in the past BATCH file (to generate "multimapkey") but it was very slow. With this "html" utility it works very good for me and very fast also.

 

I have an idea also to create a variable custom mapkey - instead of using FIX 4K, but my experiences in programming are not so good so I have created simple code.

 

Also - apply switch > Mapkey suitable with Windchill or not - is a good idea ... but I need to practice my programming skills first and maybe in future I will change the code for this simple utility 😊

 

Bye, Vladimir

 

I have added also your suggested note (thanks again): 

 

Note: In the code is applied that if you use Windchill as PDM system, the generated Mapkey will automatically click OK button to PDM storage conflicts (~ Activate `storage_conflicts` `OK_PushButton`;). This configuration could be risky for some cases. In the current state, the user could set the config option dm_checkout_on_the_fly to handle this.

 

Version history
Last update:
‎Aug 27, 2021 09:48 AM
Updated by: