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

Mapkey difficulty with Creo UI across modes

Highlighted
Aquamarine

Mapkey difficulty with Creo UI across modes

In the process of mapping customizations to Creo 2 migrating from WF. As with going to WF almost all mapkeys of non trivial functionality no longer work with the new UI. I am rewriting them and finding that the recorded mapkeys are so context sensitive they do not work across modes (part, assy, sheet metal, etc.) they should as the commands in the mapkeys are available in different modes and are invoked with the UI with the same user interaction in multiple modes. I am looking for some help to overcome this seemingly unbelievable oversight with respect to macros usability.

I have a sequence of mapkeys that have worked in the past and I realize that with the new UI I need to adapt and am willing to do it (begrudgingly). I am so far not impressed with the ability to customize the UI to support my workflow with mapkeys. A case in point follows;

This mapkey is intended to use the find tool to select the first Csys in the active model when executed. It uses rules in the find tool that when done using the mouse keyboard results in proper function across modes (part, assy etc.) when recorded as a mapkey it does not. I can see differences in the `ResultList` 1 `7:52:` (next to last line below) selection in the trail files from mode to mode. The underlined string varies between modes, I can find no documentation at PTC.COM or searching Google that offers any insight into how this is handled internally by Creo and am stuck for the moment. I have opened a call with PTC.

Note that all available selections are defined explicitly in the mapkey and it works in part mode as intended. When invoked in Assy mode for testing it does not work. This sequence is used in a nested mapkey sequence to automate measure tool commands and should work identically anywhere that the measure tool can be invoked within Creo. Does anyone know how to modify the syntax or record this sequence so that is mode "agnostic"? I am aware I can record mode specific commands and nest them but that is truly onerous (I should not have to do it) when the function call should work across modes where applicable.

mapkey .ics0 @MAPKEY_LABELtest pick cs0;\

mapkey(continued) ~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;\

mapkey(continued) ~ Command `ProCmdMdlTreeSearch` ;~ Open `selspecdlg0` `SelOptionRadio`;\

mapkey(continued) ~ Close `selspecdlg0` `SelOptionRadio`;\

mapkey(continued) ~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\

mapkey(continued) ~ Open `selspecdlg0` `LookByOptionMenu`;\

mapkey(continued) ~ Close `selspecdlg0` `LookByOptionMenu`;\

mapkey(continued) ~ Select `selspecdlg0` `LookByOptionMenu` 1 `Coord Sys`;\

mapkey(continued) ~ Activate `selspecdlg0` `EvaluateBtn`;\

mapkey(continued) ~ Select `selspecdlg0` `ResultList` 1 `7:52:`

mapkey(continued) ~ Activate `selspecdlg0` `ApplyBtn`;~ Activate `selspecdlg0` `CancelButton`;

4 REPLIES 4

Re: Mapkey difficulty with Creo UI across modes

Don´t know if that is possible only with mapkeys...

But I have a solution that may work for your specific case if you only need to select the first result found.

Replace the line

mapkey(continued) ~ Select `selspecdlg0` `ResultList` 1 `7:52:`

with

mapkey(continued) ~ Select `selspecdlg0` `ResultList` -1; \

This will select all results found (similar to Control+A), but if only one result is expected, then only the first will remain selected.

The second step is to guarantee that the first result is the first in the tree, and there´s a option for that: options->sort by...-> Item Id

Not sure that it will work as you intend, but try the code I attached.

Jose

Re: Mapkey difficulty with Creo UI across modes

Of course, you can always pause the mapkey, select the first result and press resume

Re: Mapkey difficulty with Creo UI across modes

Get used to it. Most of mine from WF4 don't work in dwg mode. Before they FUBAR'd the menu up in dwg mode, almost ALL of my mapkays worked there, now they only work in modeling mode. At least in the earlier revs of Pro/E, almost all of your mapkeys worked in the new releases. With creo, you can count on them not working. Sadly, this now forces us to basically double our mapkeys, just so we can get some to work in dwg mode. Stupid.....

Re: Mapkey difficulty with Creo UI across modes

Jose,

That is exactly the type of info we need to be sharing. I just tested it out and reworked the mapkey in assy mode. I am surprised but it works in part mode as well without any issue so far. It is failing when I have nested it in another mapkey call but there is a way around that by modifying the search parameters in the find tool.

Do you have any other flag settings for the Results list array in the find tool? If there is an explanation of what the options are and what they do that would ne useful. With the new UI I suspect I will be digging through trail files to try and figure out how to get around some of these idiosyncracies.

As for pausing for user interaction that is sometimes warranted but in this case I am building a nested sequence that will enable an incremental measurement tool that will use the def csys of a model/assy as a projection reference so the macro needs to run without user interaction to save time.