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

Workaround needed for "Select by menu last feature" from pre WF UI in Creo

tbraxton
21-Topaz II

Workaround needed for "Select by menu last feature" from pre WF UI in Creo

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.

 

 

C2 UI FS.jpg


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
1 ACCEPTED SOLUTION

Accepted Solutions
tbraxton
21-Topaz II
(To:tbraxton)

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

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

View solution in original post

3 REPLIES 3

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.

tbraxton
21-Topaz II
(To:tbraxton)

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

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
Jose_Costa
6-Contributor
(To:tbraxton)

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

Top Tags