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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to add letter/mark/symbol for 2D dimension properities continuous

Alpha_Chiu
4-Participant

How to add letter/mark/symbol for 2D dimension properities continuous

For example, I already set up Mapkey "AA" to add symbol " * " prefix to the dimension.

And Mapkey "AB" to add letter " CP " prefix to the dimension.

Plan to get the result " CP * Dimension " by press "AA" then "AB"

or " * CL Dimension " by press "AB" then "AA"

But it will be covered by latter one.(Only " * Dimension " or " CP Dimension ")

How could I add letter/symbol continuous both prefix and suffix?

Thanks.

6 REPLIES 6


@Alpha_Chiu wrote:

For example, I already set up Mapkey "AA" to add symbol " * " prefix to the dimension.

And Mapkey "AB" to add letter " CP " prefix to the dimension.

Plan to get the result " CP * Dimension " by press "AA" then "AB"

or " * CL Dimension " by press "AB" then "AA"

But it will be covered by latter one.(Only " * Dimension " or " CP Dimension ")

How could I add letter/symbol continuous both prefix and suffix?

Thanks.


I am not sure I understand exactly what you are wanting here however you can create a new mapkey that uses existing mapkeys like this:

mapkey c %AA;%AB;

mapkey d %AB;%AA;

 

Note the syntax is %<MapKey>;

Alpha_Chiu
4-Participant
(To:RandyJones)

Hi  Jones,

I try your approach but first one will be covered by later one.

Like photo below, photo 3 is what I want.

Every time the first one will be covered by later one.

I can't get *+CL in one mapkey (The approach you suggest) or two map key.

Do you have any other suggestion? Thanks.

 Mapkey: AAMapkey: AAMapkey: ABMapkey: AB

What I wantWhat I want

mapkey c %AA;%AB;

mapkey d %AB;%AA;

 

Note the syntax is %<MapKey>;

Please post the Mapkeys you have written and the version of Creo you are using.

Alpha_Chiu
4-Participant
(To:dschenken)

Hi, 

 

Here it is

-----------------------------------------

mapkey io ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;\
mapkey(continued) ~ Command `ProCmdEditProperties@PopupMenuGraphicWinStack` ;\
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` `{0:*}@D `;\
mapkey(continued) ~ Update `mod_dim_new_asynch` `txt_dim_text` `{0:*}@D `;\
mapkey(continued) ~ Move `mod_dim_new_asynch` `mod_dim_new_asynch` 2 26.339203 4.774791;\
mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;
mapkey ii ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;\
mapkey(continued) ~ Command `ProCmdEditProperties@PopupMenuGraphicWinStack` ;\
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` `{0:@+q@#}@D `;\
mapkey(continued) ~ Update `mod_dim_new_asynch` `txt_dim_text` `{0:@+q@#}@D `;\
mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;

I thought this was the case - Creo only records the finished entry in the mapkey and doesn't record the individual keypress or cursor selections/cursor movement. It always replaces the entire contents with whatever the mapkey recorded, so they can't be joined (concatenated) the way you want.

 

The line that does the replacement is:  Update `mod_dim_new_asynch` `txt_dim_text` '(whatever)'; which entirely replaces the dimension description with 'whatever'.

 

What can work is to create an AutoHotKey or AutoIt or VBA program to control the Creo interface and send simulated keystrokes to the dialog boxes. It's easy to create an interface for those with all the symbols you want and whether they would pre-fix or post-fix any existing symbols or completely replace them.

Make a 3rd mapkey that does both prefix and suffix.

Top Tags