Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I have asked previously for PTC support to provide a workaround for lost functionality but they have not been able to find a solution. In the pre Wildfire UI there was a Select by menu last feature function call which would always select the last feature created in the model. This functionality is no longer supported for mapkey use as the new UI uses a filter "last feature" but forces the selection of a unique feature from the pick list (which is by definition a single element array). To have the user use the mouse to select an element from an array of 1 is redundant. I suspect it was done for UI coding consistency but they unwittingly killed a really useful function for automation.
The old mapkey sequence that would allow one to truly select the last feature lookes like this:
mapkey smm #sel by menu;
mapkey sml %smm;#last;
Has anyone figured out a workaround for this that would work in a mapkey? I have tried invoking the old menu structure using an old mapkey sequence but it does not work.
Solved! Go to Solution.
Tech support came through on this one. So far it works for me with very limited testing (Creo 2). Explicit selection of the filter settings from the Find tool UI dialogue box was probably what I was not careful about. I miss being able to write mapkeys in a text editor from scratch. It may not be absolutely reliable due to the UI and dialogue box selections but so far so good. If anyone finds fault with this in use, please post back here an explanation of what failed.
I have explicitly recorded filter settings to be feature and last feature which should prevent some issues but maybe not all.
Solution follows:
mapkey sml @MAPKEY_LABELSelect last feature;~ Command `ProCmdMdlTreeSearch` ;\
mapkey(continued) ~ Open `selspecdlg0` `SelOptionRadio`;~ 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 `Feature`;\
mapkey(continued) ~ Select `selspecdlg0` `RuleTab` 1 `Misc`;\
mapkey(continued) ~ Select `selspecdlg0` `RuleTypes` 1 `Last Feat`;\
mapkey(continued) ~ Activate `selspecdlg0` `EvaluateBtn`;~ Activate `selspecdlg0` `ApplyBtn`;\
mapkey(continued) ~ Select `selspecdlg0` `SelectedItemsList` 1 `695:52:`;\
mapkey(continued) ~ Activate `selspecdlg0` `CancelButton`
Message was edited by: Thomas Braxton
If you create a layer by rule then the last item should always be on that layer. You can then select by layer.
It think from the requestor shown that creating a layer by rule is one of the options.
Tech support came through on this one. So far it works for me with very limited testing (Creo 2). Explicit selection of the filter settings from the Find tool UI dialogue box was probably what I was not careful about. I miss being able to write mapkeys in a text editor from scratch. It may not be absolutely reliable due to the UI and dialogue box selections but so far so good. If anyone finds fault with this in use, please post back here an explanation of what failed.
I have explicitly recorded filter settings to be feature and last feature which should prevent some issues but maybe not all.
Solution follows:
mapkey sml @MAPKEY_LABELSelect last feature;~ Command `ProCmdMdlTreeSearch` ;\
mapkey(continued) ~ Open `selspecdlg0` `SelOptionRadio`;~ 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 `Feature`;\
mapkey(continued) ~ Select `selspecdlg0` `RuleTab` 1 `Misc`;\
mapkey(continued) ~ Select `selspecdlg0` `RuleTypes` 1 `Last Feat`;\
mapkey(continued) ~ Activate `selspecdlg0` `EvaluateBtn`;~ Activate `selspecdlg0` `ApplyBtn`;\
mapkey(continued) ~ Select `selspecdlg0` `SelectedItemsList` 1 `695:52:`;\
mapkey(continued) ~ Activate `selspecdlg0` `CancelButton`
Message was edited by: Thomas Braxton
Something similar in this post:
Any how (like macro) to repeat last command?
To select all results use "-1".
Example: your last two lines can be
mapkey(continued) ~ Select `selspecdlg0` `ResultList` -1;\
mapkey(continued) ~ Activate `selspecdlg0` `CancelButton`;
It should work for your macro.
Jose