Skip to main content
10-Marble
Apr 17, 2014 5:41 PM UTC
Question

Mapkey using right button menu

Hi all,

I'm not able to create a mapkey where I have to activate a command present in a right button menu, after selection a model.

Eg.

mapkey _test ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\

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

That command is not present in any other place on the ribbon.

Any possible solution?

Thanks

15 replies

1-Visitor
Apr 17, 2014 10:34 PM UTC

What exactly are you trying to do? It's hard to tell from the mapkey commands what is going on.

Translate
24-Ruby III
Apr 18, 2014 5:13 AM UTC

Hello,

I think that it is not possible to record right button menu click into a mapkey. But I am not quite sure.

Martin Hanak

Translate
1-Visitor
Apr 18, 2014 6:10 AM UTC

whats your objective?

Translate
10-Marble
Apr 18, 2014 6:26 AM UTC

It's possible to use an RMB click in a mapkey, as it has always been, but I would strongly advise not to use it.

I used to make mapkeys in WF2. In the beginning I used a lot of RMB clicks, but sometimes these mapkeys would just stop working in the middle of a session. When I reprogrammed them using the menu bar, they always worked flawless.

On Creo 2 however, I haven't made a lot of mapkeys yet, Since THEY stole our menu bar, it's gotten a lot harder to make them decent.

You probably want to make a mapkey that automates something in the dimension properties, right? I've launched the same question a while ago, but never got the answer I was hoping for...

http://communities.ptc.com/message/230659#230659

Translate
10-Marble
Apr 18, 2014 7:37 AM UTC

The goal of this mapkey is start a function of a auxiliary application, not an ootb command, this is why I wrote that is present only in RMB menu.

The mapkey has to work in assembly and part environment, not in drawing.

Thanks.

Translate
10-Marble
Apr 18, 2014 7:42 AM UTC

What do you mean with an auxiliary application? Is it something like a script?

Translate
10-Marble
Apr 18, 2014 8:10 AM UTC

It's a externnal application created with Pro/TOOLKIT. I register it by .dat files

Translate
12-Amethyst
Apr 18, 2014 7:53 PM UTC

Are you selecting a model before calling the mapkey?

I tried the same here and the mapkey worked fine.

mapkey test ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\

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

Or maybe some problem in your application.

I made a short video:

Video Link : 4902

Good luck,

Jose


Translate
10-Marble
Apr 22, 2014 9:56 AM UTC

Hi Jose

yes, i'm able to reproduce what you have done in the video, but the problem is that after Creo restarting the mapkey doesn't work.

To make it work I have to do before a manually click with RMB and then it always works...

david

Translate
1-Visitor
Apr 22, 2014 12:17 PM UTC

Hi David,

Are you saying there is no longer an issue with creating the mapkey and it is now just an issue of saving it?

Translate
10-Marble
Apr 22, 2014 2:08 PM UTC

Hi,

No creating or saving issue, but seems related to the kind of mapkey and more precisely about RMB menu.

Translate
12-Amethyst
Apr 22, 2014 11:12 AM UTC

Hi David,

I restarted my Creo here and it works.

How do you save your mapkeys?

I do it manually, I save the mapkey to a file, then I grab the text in it and copy/paste it to my config.pro.

Translate
10-Marble
Apr 22, 2014 2:05 PM UTC

I did the same but seems that there is something for which reason the right-click menu is activated only if before is done manually

I attach a video, I hope it can help..

thanks

Video Link : 4904

Translate
12-Amethyst
Apr 22, 2014 10:11 PM UTC

Humm, I can´t reproduce that here... It´s hard to tell.

Some suggestions:

1 - Call the command directly:

mapkey test ~ Command `user_popup_item_cmd`;

2 - Read the trail faile and the status bar, maybe you can find there the error.

Jose

Translate