Hello,
I am trying to record a mapkey in Creo for the Insert Here command, in an assembly:
I want it to be universal, obviously. I recorded it with the mouse, and it works in the assembly of the record, but doesn't in others.
Does anyone know the command line I might insert in the config.pro to make it usable everywhere and always?
The current lines of the recorded one are the following:
thanks
Tommaso
See attached below a snippet from our mnemonic set of mapkeys for Creo 4 to use 1) Select part/feature you wish to insert below [it should work in part and Assembly mode] 2)* hit mapkey ih this should enter Insert Here mode (* If it doesn't work first time hit ih again, the toogle function was probably left in exit mode) 3) To exit either a) hit ih again - should toggle and automatically resume suppressed features/parts OR b) reverse hotkey, e.g hi, and this should start the exit insert mode, but leave the user to hit the yes prompt
Regards
Copy below into your config.pro provided none of the
mapkey names clash! ! **** Mapkeys to enter and leave Insert Here mode ****
! mapkey ih @MAPKEY_LABEL(toggle) activate Insert Here ...[ih];\
mapkey(continued)%.ih;
!
mapkey hi @MAPKEY_LABEL exit Insert Here mode ...[hi];\ mapkey(continued) ~ Command `ProCmdCancel`;
!
mapkey .ih @MAPKEY_LABELtoggle Insert Here (int)...[.ih];\
mapkey(continued) ~ Command`ProCmdActivateInsert`;\
mapkey(continued) %.toggle_1;\
mapkey(continued) ~Update `add_opt` `EditPanel` `ih %.hi`;\
mapkey(continued) %.toggle_2;
!
mapkey .hi @MAPKEY_LABEL Insert Here (int)...[.hi];\
mapkey(continued) ~Command `ProCmdCancel`;Yes;\
mapkey(continued) %.toggle_1;\ mapkey(continued) ~ Update `add_opt` `EditPanel` `ih %.ih`;\ mapkey(continued) %.toggle_2;
!
! ****** Do not change *****
mapkey.toggle_1 ~ Command `ProCmdRibbonOptionsDlg` ;\
mapkey(continued) ~ Select`ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\ mapkey(continued) ~ Activate `ribbon_options_dialog``ConfigLayout.AddOpt`;\
mapkey(continued) ~ Input `add_opt` `InputOpt``mapkey`; ~ Update `add_opt` `InputOpt` `mapkey`;\
mapkey(continued) ~Activate `add_opt` `InputOpt`;~ FocusOut `add_opt` `InputOpt`; !
mapkey.toggle_2 ~ Activate `add_opt` `EditPanel`;\
mapkey(continued) ~ Activate`ribbon_options_dialog` `OkPshBtn`; !********************************************************************
Hello Cadcam,
thanks very much for your reply and I am sorry I couldn't reply before.
I have tried your mapkeys but they don't work (I am using Creo 3 if it may matter).
In the lower left corner the message "Playing mapkey ih.." appears, and nothing happens. I have also tried to hit once more but with no success.
Anyway I found the solution, It was just to simply insert the line:
mapkey(continued) ~ Command `ProCmdActivateInsert`;
to enter insert mode
and eventually another mapkey with:
mapkey(continued) ~ Command `ProCmdResumeLast`;
to resume last set.
(no need to have a toggle function for the moment, even if it would probably be a finer solution).
I also have another question to ask you, how do you play double letters makeys by keystrokes (If it is possible)? when I try to hit for example "rl", since I have another mapkey named "r", it plays this latter instead of the "rl" one...as if it took just the first letter.
Thanks,
bye
You can use double letter mapkeys as long as the first letter is not a mapkey by itself.
So if you have a mapkey that is "L", you can't have any other mapkeys that start with "L".
The key is, don't use single letter mapkeys.
Thanks for the hint re resume last.
I have included it in the ih (toggle) and hi reverse command below. Seems to work in Creo 4.0 M020 and Creo 3.0M100
Regards
mapkey ih @MAPKEY_LABEL(toggle) activate Insert Here ...[ih];\
mapkey(continued) %.ih;
!
mapkey hi @MAPKEY_LABEL exit Insert Here mode ...[hi];\
mapkey(continued) ~ Command `ProCmdResumeLast`;
!
mapkey .ih @MAPKEY_LABEL toggle Insert Here (int)...[.ih];\
mapkey(continued) ~ Command `ProCmdActivateInsert`;\
mapkey(continued) %.toggle_1;\
mapkey(continued) ~ Update `add_opt` `EditPanel` `ih %.hi`;\
mapkey(continued) %.toggle_2;
!
mapkey .hi @MAPKEY_LABEL Insert Here (int)...[.hi];\
mapkey(continued) ~ Command `ProCmdResumeLast`;\
mapkey(continued) %.toggle_1;\
mapkey(continued) ~ Update `add_opt` `EditPanel` `ih %.ih`;\
mapkey(continued) %.toggle_2;
!
!
! ****** Do not change *****
mapkey .toggle_1 ~ Command `ProCmdRibbonOptionsDlg` ;\
mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\
mapkey(continued) ~ Input `add_opt` `InputOpt` `mapkey`; ~ Update `add_opt` `InputOpt` `mapkey`;\
mapkey(continued) ~ Activate `add_opt` `InputOpt`;~ FocusOut `add_opt` `InputOpt`;
!
mapkey .toggle_2 ~ Activate `add_opt` `EditPanel`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;
you are welcome, thanks for your reply too.
I tried and both ih and hi seem to be working, except that when I play the ih, the configuration editor window appears...and in fact I see the toggle 1 contains Command `ProCmdRibbonOptionsDlg`.
I am not sure I have got well the function of the two toggles (I would anyway have to press two different mapkeys (ih and hi).
Also, why do you include the `ProCmdRibbonOptionsDlg`?
bye