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

mapkey trouble in Creo 2.0

Regular Member

mapkey trouble in Creo 2.0

Hello,

 

 

Recently our company upgraded from PRO/E WF2 to CREO2.

 

 

I had made a bunch of mapkeys to speed up detailing of drawings, for exemple:

 

 

)) would put the selected dimensions between brackets: dim > (dim)

*2 would add (2x) behind the dim: dim > dim(2x)

 

 

This is how they looked in de Pro/E config:

 

 

mapkey )) @MAPKEY_LABELHAAKJES;~ Close `main_dlg_cur` `MenuBar1`;\

mapkey(continued) ~ Activate `main_dlg_cur` `Edit.psh_dwg_props`;\

mapkey(continued) ~ Select `mod_dim_asynch` `tab_main`1 `lay_dim_text`;\

mapkey(continued) ~ FocusIn `mod_dim_asynch` `inp_dim_prefix`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_prefix` `(`;\

mapkey(continued) ~ Update `mod_dim_asynch` `inp_dim_prefix` `(`;\

mapkey(continued) ~ FocusOut `mod_dim_asynch` `inp_dim_prefix`;\

mapkey(continued) ~ FocusIn `mod_dim_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_postfix` `)`;\

mapkey(continued) ~ Update `mod_dim_asynch` `inp_dim_postfix` `)`;\

mapkey(continued) ~ FocusOut `mod_dim_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Activate `mod_dim_asynch` `psh_ok`;

 

mapkey *2 @MAPKEY_LABEL2x;~ Activate `main_dlg_cur` `Edit.psh_dwg_props`;\

mapkey(continued) ~ Select `mod_dim_asynch` `tab_main`1 `lay_dim_text`;\

mapkey(continued) ~ FocusIn `mod_dim_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_postfix` `(`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_postfix` `(2`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_postfix` `(2x`;\

mapkey(continued) ~ Input `mod_dim_asynch` `inp_dim_postfix` `(2x)`;\

mapkey(continued) ~ Update `mod_dim_asynch` `inp_dim_postfix` `(2x)`;\

mapkey(continued) ~ FocusOut `mod_dim_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Activate `mod_dim_asynch` `psh_ok`;

 

 

This eased up detailing of the drawing, and the different mapkeys could be combined, i.e.:

 

select dim + press )) + press *2 = (dim)(2x)

 

Also notice how I never used RMB to go to dimension properties. I always used the menubar. The first versions of my *-mapkeys used the RMB and sometimes they stopped working in the middle of a session. Going trough the menubar, that never happened again.

 

And now on to Creo 2.0.

First problem, there is no more menubar! And there's also no button for dimprop in the ribbon. Command Search doesn't find anything like it either. So now I'm forced to use RMB. Here are the new versions of these mapkeys in Creo:

(never mind the smiley, it's a ; and a \ actually)

 

mapkey )) @MAPKEY_LABELhaakjes;\

mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\

mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;~ Command `ProCmdEditProperties`

mapkey(continued) ~ Select `mod_dim_new_asynch` `tab_main` 1 `lay_display`;\

mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `inp_dim_prefix`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_prefix` `(`;\

mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `inp_dim_prefix`;\

mapkey(continued) ~ Update `mod_dim_new_asynch` `inp_dim_prefix` `(`;\

mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_postfix` `)`;\

mapkey(continued) ~ Update `mod_dim_new_asynch` `inp_dim_postfix` `)`;\

mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;

 

mapkey *2 @MAPKEY_LABELx2;\

mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\

mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;~ Command `ProCmdEditProperties`

mapkey(continued) ~ Select `mod_dim_new_asynch` `tab_main` 1 `lay_display`;\

mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_postfix` `(`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_postfix` `(2`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_postfix` `(2x`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `inp_dim_postfix` `(2x)`;\

mapkey(continued) ~ Update `mod_dim_new_asynch` `inp_dim_postfix` `(2x)`;\

mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `inp_dim_postfix`;\

mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;

 

 

Using the RMB I'm willing to accept, but the bigger problem is they do not combine anymore, i.e.:

 

select dim + press )) + press *2 = (dim(2x)

 

As you can see the brackets around the dim are not closed anymore. This is because in WF2, when you filled out a prefix and a suffix, after 'OK' and exiting dimprop, it would be added to the dimension, freeing the prefix and suffix square for new entries. Now it keeps it in the square, overwriting it when an other mapkey is used.

 

Does anybody have a solution to my problem, or perhaps some examples of brand new Creo2 mapkeys they made themselves?

16 REPLIES 16

Re: mapkey trouble in Creo 2.0

hi,

In WF4 it also works such that Prefix and Sufix gets appended to dimension text after the Dimension Properties window closes.

No idea why they changed the behaviour in Creo Parametric, it's pretty tough to append these parentheses () to a dim that already has a prefix or sufix when it behaves this way. I mean, it's not doable just with Creo mapkeys for sure.

Re: mapkey trouble in Creo 2.0

Your message prompted me to go make some mapkeys that I have been meaning to make for a while now.

When I make (dims), I just use Ref Dimensions instead of Dimenisons.

I made a mapkey for adding a diameter symbol in front of a dimension like for linear dimsions and I put that in the Prefix part, I also created a (2) mapkey but instead of putting that in the suffix area, I but it right in the text window so the 2 don't cancel each other out. I am going to try this in workflow and see if it works they way I think it should.

Re: mapkey trouble in Creo 2.0

I created one to do what I think you are looking for and it works for me:

mapkey )) @MAPKEY_LABELReference_Dim;\

mapkey(continued) ~ Command `ProCmdEditProperties`;\

mapkey(continued) ~ Select `mod_dim_new_asynch` `tab_main` 1 `lay_display`;\

mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `txt_dim_text`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D)`;\

mapkey(continued) ~ Update `mod_dim_new_asynch` `txt_dim_text` `(@D)`;\

mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\

mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;

mapkey *2 @MAPKEY_LABEL2X;\

mapkey(continued) ~ Command `ProCmdEditProperties`;\

mapkey(continued) ~ Select `mod_dim_new_asynch` `tab_main` 1 `lay_display`;\

mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `txt_dim_text`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D)(`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D)(2`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D)(2X`;\

mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `(@D)(2X)`;\

mapkey(continued) ~ Update `mod_dim_new_asynch` `txt_dim_text` `(@D)(2X)`;\

mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\

mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;

Had to remove a few spaces to keep the smilies from infesting the code...hopefully that doesn't affect the mapkeys.

Re: mapkey trouble in Creo 2.0

Nevermind, I'm seeing what the problem is now. Looks like you'll need to create a separate mapkey for adding )(2X) at the end of a dimension.

Re: mapkey trouble in Creo 2.0

In the mean time I found a partial solution to my own problem.

If you add the brackets to the prefix and suffix, and add the (2x) to the dimension text, it works. However, this solution doesn't satisfy me, because I also had mapkeys for adding a diameter symbol (Ø), or an M for metric, which will no longer work.

If anyone knows a decent solution (ie. making it work like the Ol' Days), I would be glad to hear it...

2xhaak.png

Re: mapkey trouble in Creo 2.0

maybe another mapkey for ref dimensions with (Ø in the prefix.


Re: mapkey trouble in Creo 2.0

I don't want to burden myself and my coworkers with to much mapkeys.

One symbol, One mapkey. Combining symbols should be a matter of typing several mapkeys in a row, otherwise it will get to complicated.

Re: mapkey trouble in Creo 2.0

Rob, what you want is not doable just with Creo mapkeys.

To fake this old functionality, which is now gone, I'd make at least two scripts in Autohotkey, and then mapkeys to run these scripts.

I'll probably make them later in the future once this starts to bother me, but right now that seems like much work.

Re: mapkey trouble in Creo 2.0

The way Creo works now I doubt you can do this with mapkeys.

Maybe the best option here is a external script: Autohotkey or Autoit (they are similar).

These programs send a series of programmed keystrokes to Creo. They aren´t so robust as mapkeys but in some situations are the best options.

This is how I would do it with Autoit:

WinWaitActive ("Dimension Properties"); Waits for the window of Dimension Properties to be active

Send("{RIGHT}^{TAB 6}{END}"); Sends a sequence of Keystrokes

Send("("); sends text for preffix

Send("{TAB}{HOME}")

Send(")"); sends text for suffix

Send("{TAB 10}{Enter}"); Sends a sequence of Keystrokes