Skip to main content
21-Topaz I
July 11, 2018
Solved

Creo 4 mapkeys

  • July 11, 2018
  • 2 replies
  • 10576 views

I am in the process of re-doing some of our mapkeys. It looks like in Creo 4 the mapkeys have gotten even more verbose than in Creo 3. Here is a thread on them in Creo 3:

https://community.ptc.com/t5/System-Administration/Creo-3-Mapkeys/td-p/166770

 

Now they look like this:

mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 181 220 4259937 0 1421 922 1920 1200 \
mapkey(continued) 8262369 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 181 220 4325474 0 1421 922 1920 1200 \
mapkey(continued) 8262369 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 181 220 4391011 0 1421 922 1920 1200 \
mapkey(continued) 8262369 `C`;\

 

Has anyone deciphered if all of those extra codes are required? I tried deleting all except for the last 7 digit one but that didn't work. Is there an easier way to enter / edit text in a mapkey?

 

If not then I will probably resort to text from file just to keep the length of the mapkeys down and readable.

Best answer by TomU

If you open the properties window (table cell or note) you can still enter the text "normally".

mapkey(continued) ~ Command `ProCmdEditProperties@PopupMenuGraphicWinStack` ;\
mapkey(continued) ~ Update `note_text_asynch` `txt_note_text` `ABCABCabc123123`;\

If you feel like manual editing, it seems like you can remove all the extra "common" numbers:

mapkey tom ~Activate `main_dlg_cur` `page_Annotate_control_btn` 1;\
mapkey(continued) ~ Command `ProCmdDtlInsFreeNote` ;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4259905 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4325442 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4390979 `C`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4259937 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4325474 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 4391011 `C`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 540082225 `1`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 540147762 `2`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 540213299 `3`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 3211313 `1`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 3276850 `2`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 3342387 `3`;

Of course no guarantee this will continue to work with future version of Creo...

2 replies

21-Topaz II
July 12, 2018

In a previous discussion on the creation of mapkeys, @dgschaefer brought the following very helpful tip:

 

Use the config option "cmdmgr_trail_output yes" to eliminate most of the extra lines from your mapkeys.

 

Hopefully this trick will simplify your recordings.

Chris321-Topaz IAuthor
21-Topaz I
July 12, 2018

I appreciate the help, but I already have cmdmgr_trail_output set to yes

 

The issue revolves around PTC's implementation of support for double-byte characters. In order to support double-byte characters they are now recording these overly long identifying numbers in the mapkeys.

 

I don't think there is a way around them (aside from text from file) but I figured I would ask.

 

I just tried re-recording the same exact mapkey multiple times and it looks like some of the numbers change even from session to session of recording which boggles the mind. It looks like the 2nd, 3rd and last group of numbers need to be there but it doesn't matter what they actually are.

23-Emerald IV
July 12, 2018

Yes, the codes are required.  The character displayed at the end is to help with readability.  It has no impact on the value actually used.  From my post here:

 

"Mapkeys are still editable, but the text they enter is not intuitive.  Each letter is represented by an 8 digit code.  This code is different for upper case, lower case, and where the number is entered (number pad or main keyboard area.)  The letter/number displayed after this code is NOT necessarily the character that will be entered.  (For example, the mapkey text will always show upper case characters even if the code is for entering a lower case character.  To change the text that is entered, you must change the 8 digit code.  Changing the displayed characters doesn’t do anything."

 

Creo 3 Mapkeys.jpg

 

https://www.ptc.com/en/support/article?n=CS185955

https://community.ptc.com/t5/System-Administration/Text-edit-style-format-mapkey-in-Creo-3-0/m-p/290357

https://community.ptc.com/t5/Creo-Modeling-Questions/new-text-editor/m-p/239205#257971

Chris321-Topaz IAuthor
21-Topaz I
July 12, 2018

Thanks. I read through those threads. If you look at the mapkey snippet I posted (Creo 4) it appears as if the number of characters in a mapkey line has actually grown quite a bit for every letter compared to your snippet from Creo 3.

23-Emerald IV
July 12, 2018

I wonder if those are screen positions...  Have you tried removing them?

 

Maybe try this:

 

mapkey(continued) ~ Key `main_dlg_cur` 8262369 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` 8262369 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` 8262369 `C`;\

 

Or this:

mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 8262369 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 8262369 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 8262369 `C`;\