Skip to main content
12-Amethyst
November 11, 2021
Solved

Re: Mapkey Writing/Editing Tips

  • November 11, 2021
  • 3 replies
  • 5769 views

As per the original thread Does anyone know if it's possible to trim down NOTE mapkeys?  I'm not seeing the same format as say, a table input, so the option to cut every thing down using input / table_input doesn't seem applicable.  Thanks! Syntax for the NOTE that Creo recorded is below:

mapkey(continued) ~ 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` 9 183 -13 4259905 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 5439571 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `S`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 5439571 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `S`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 4522053 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `E`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 5046349 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `M`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 4325442 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `B`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 4980812 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `L`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 183 -13 5832793 1536 2965 1134 1920 1080 \
mapkey(continued) 192499 `Y`;\

Best answer by BG_9869104

Below mapkey:

  1. opens a free note.
  2. pause for pick location.
  3. resume.
  4. edit the text height(could add other format edits). 
  5. uses "paste"(there is no real paste but I pasted in the text from windows clipboard to get a proper recording). Note the pasted text is "BigtestY\n" which is BigtestY + a return to get to next line.
  6. repeat step 4 to edit text format
  7. repeat step 5 but with new text input
  8. rinse and repeat as needed 

Im in metric so my text heights are 10, 6, and 4 in this example.

 

mapkey $F9 @MAPKEY_LABELmultisizenote;\
~ Command `ProCmdDtlInsFreeNote` ;\
@MANUAL_PAUSEPick Location;\
~ Command `ProCmdDtlSetTextHeight` 10.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `BigtestY\n`;\
~ Command `ProCmdDtlSetTextHeight` 4.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `smalLTesty\n`;\
~ Command `ProCmdDtlSetTextHeight` 6.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `meDiumteSty\n`;\
~ Command `ProCmdDtlSetTextHeight` 4.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `smalLTesty`;

 

3 replies

17-Peridot
November 11, 2021

Every Note area seems to be slightly different. I had to do a couple tricks to get 3D Notes/Annotations to get the mapkey to be cleaner/easier to edit. I typed in a character A, then ESC, and then I could access the right click 'properties' command. Kinda clunky but it works. The mapkey code below is with Creo 4 M150.

 

mapkey(continued) ~ Command `ProCmdUniEditProp@PopupMenuTree`;\
mapkey(continued) ~ Command `ProCmdDtlInsFreeNote`;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 1257 139 4259905 512 1583 776 1920 1080 \
mapkey(continued) 582109 `A`;\
mapkey(continued) ~ Key `main_dlg_cur` `proe_win` 9 1237 249 65536 1536 1583 776 1920 1080 \
mapkey(continued) 1470518 `Esc`;\
mapkey(continued) ~ Command `ProCmdUniEditProp@PopupMenuGraphicWinStack`;\
mapkey(continued) ~ Update `note_3d` `sym_area_note_text` `ASSEMBLY`;\
mapkey(continued) ~ Activate `note_3d` `psh_ok`;\

lockarde12-AmethystAuthor
12-Amethyst
November 12, 2021

Thanks @lhoogeveen!  I'll mess around with and see if I can emulate that.  Ideally, the note would have two lines, top line at .375 height, and the next line at .188.  I was able to get the mapkey to do all of that, but it ended up being very long because it tracked every key stroke.  I will see if I can incorporate your method to pair it down and still get the text to resize like I want. 

14-Alexandrite
November 16, 2021

Another tool that may be useful is stuffing all the text into separate parameters or in not displayed notes added to the model tree. The text then can be brought in with the &. 

&bigtexttitleline
&smallertext

 

&note_1

&note_2

Not a solution just more ways to get the mapkey plus other stuff to create what you want in the end.

14-Alexandrite
November 17, 2021

Below mapkey:

  1. opens a free note.
  2. pause for pick location.
  3. resume.
  4. edit the text height(could add other format edits). 
  5. uses "paste"(there is no real paste but I pasted in the text from windows clipboard to get a proper recording). Note the pasted text is "BigtestY\n" which is BigtestY + a return to get to next line.
  6. repeat step 4 to edit text format
  7. repeat step 5 but with new text input
  8. rinse and repeat as needed 

Im in metric so my text heights are 10, 6, and 4 in this example.

 

mapkey $F9 @MAPKEY_LABELmultisizenote;\
~ Command `ProCmdDtlInsFreeNote` ;\
@MANUAL_PAUSEPick Location;\
~ Command `ProCmdDtlSetTextHeight` 10.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `BigtestY\n`;\
~ Command `ProCmdDtlSetTextHeight` 4.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `smalLTesty\n`;\
~ Command `ProCmdDtlSetTextHeight` 6.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `meDiumteSty\n`;\
~ Command `ProCmdDtlSetTextHeight` 4.000000;\
~ Command `ProCmdEditPaste` ;\
~ Trail `UI Desktop` `UI Desktop` `TrailProcessEditPasteTextEdit` `smalLTesty`;

 

lockarde12-AmethystAuthor
12-Amethyst
November 22, 2021

Thank you @BG_9869104 !  This worked perfectly - changed the text to match what I wanted and it performs exactly like I want.  Trimmed my map key down from ~73 lines to 9!