Skip to main content
Jan 10, 2018 8:12 AM UTC
Question

Mouse middle button in mapkeys

Hi all,

in Creo3, I created  a mapkey to put automatically a symbol in 2D drawings using "on entity" placement option and selecting a Csys in the 3D model tree.

But when you place a symbol, you must clic the mouse middle button to stop placement and to be able to select "OK" in the dialog box.

Unfortunately, the mouse middle button clic is not recorded in the mapkey. Running it, the mapkey stops at this step and do not end.

 

Mapkey sequence:
 mapkey dup @MAPKEY_LABELdup;\
mapkey(continued) ~ Activate `main_dlg_cur` `page_Annotate_control_btn` 1;\
mapkey(continued) ~ Command `ProCmdDwgCrSymInstCust` ;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` `DLG_PREVIEW_POST` `file_open`;\
mapkey(continued) ~ Select `file_open` `Ph_list.Filelist` 1 `csys_piping_iso.sym`;\
mapkey(continued) ~ Command `ProFileSelPushOpen_Standard@context_dlg_open_cmd` ;\
mapkey(continued) ~ Select `main_dlg_cur` `PHTLeft.AssyTree` 1 `node23`;\
mapkey(continued) ~ Activate `drawing_sym` `OK_push`;

I tried to copy a middle clic sequence from a trail file but it doesn' t work. It's like the middle button was kept pressed.
 

trail file sequence:
~ MButtonArm `main_dlg_cur` `proe_win` 9 1439 512 0 2 1536 902 1920 1200 73284
~ MButtonDisarm `main_dlg_cur` `proe_win` 9 1439 512 0 0 1536 902 1920 1200 73489

 

Any idea folks ?

7 replies

Jan 10, 2018 11:09 AM UTC

Try to create and play trail file to place a symbol

File > Manage Session > Play Trail File

 

When running or creating a mapkey that requires a left, right, or middle click the click is not recorded

Aug 19, 2018 5:32 PM UTC

hi DTC60,

 

You could add a 'pause' in the mapkey when you are recording it. In this pause you will clic the mouse middle button twice, then resume the mapkey to be able to select "OK" in the dialog box, and finish the recording.

 

kk.jpg

Every time you run the mapkey you have to click the mouse middle button twice 'manually' and then click resume, but the job will be done.

 

DCT60Author
Aug 20, 2018 6:04 AM UTC

Thanks for your answer but I know this process by heart !

What I try to find is an alternate solution to avoid the "pause" in mapkeys what is deadly boring!!

Aug 20, 2018 12:01 PM UTC

DCT60,

 

You can use an AutoIT script [https://www.autoitscript.com/site/autoit/] to send the mouse clicks to Creo Parametric.

 

Regards,

Dan N.