Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Does anyone know how to make a mapkey (Creo 9+) to consistently select features by name?
For example, here is an old one: mapkey sx #sel by menu; #axis; ~ Select `sellist0` `Namelist`1 `A_1`;
Super simple, selects the axis "A_1" in nearly every situation in Pro/E. Use it when defining features, use it in sketcher when selecting references, and when dimensioning. Works in part, sketcher, etc.. No need to have axis visible, and no need to scroll the model tree to find it. Super consistent, and always works.
How can we do that in Creo?
I want to do it (again) for all the normal datums that are standard for my start files. It's extremely useful for defining sketch placement, making measurements, placing dimensions, defining references, etc.. Unfortunately, I don't see how to use the new selection by name spaghetti of Creo to do it consistent for all situations.
Anyway, the standard scrolling for datums all the time is SSOOOO slow with large parts and assemblies - making me crazy.
Here is another example. This one selects the datum plane "FRONT":
mapkey sf #SEL BY MENU;~ Open `selspecdlg0` `SelOptionMenu`;\
mapkey(continued) ~ Close `selspecdlg0` `SelOptionMenu`;\
mapkey(continued) ~ Select `selspecdlg0` `SelOptionMenu`1 `Datum`;\
mapkey(continued) ~ Open `selspecdlg0` `SpecifyByMenu`;~ Close `selspecdlg0` `SpecifyByMenu`;\
mapkey(continued) ~ Select `selspecdlg0` `SpecifyByMenu`1 `Name`;\
mapkey(continued) ~ Input `selspecdlg0` `AccelPanel` `FRONT`;\
mapkey(continued) ~ Update `selspecdlg0` `AccelPanel` `FRONT`;\
mapkey(continued) ~ Activate `selspecdlg0` `SelectButton`;
Thank you for any help you can provide.
A long time ago (Pre-Wildfire I think). I had mapkeys that would set up the sketching plane using the 3 default DTM planes in a start part. If that is what you are trying to do, I am not sure that is possible in Creo. I opened a case with PTC when those mapkeys failed and they were not able to come up with a work around other than to use the new "improved UI" since the GUI was better.
The search tool in Creo is pretty powerful but the documentation on how to build a query is woefully incomplete. I have asked PTC to better document it and would like to get more users to lean on them for this.
"Works in part, sketcher, etc.. No need to have axis visible, and no need to scroll the model tree to find it. Super consistent, and always works."
This where you will run into the biggest issue is with multi-mode mapkeys in Creo. The UI is now not identical in sketch, part, assembly mode etc, Again I have asked PTC for solutions to multi-mode mapkeys, no meaningful response. In some cases I have built nested mapkeys that call the part mode and assembly mode mapkeys (for the same command sequence) from one mnemonic to get around this.
An example of a multi mode mapkey:
Strategies to implement multi mode mapkey function... - PTC Community
Yes, you're seeing the same thing. What a bummer that the GODS at PTC are so much smarter than the customers they claim to serve.
I can make mapkeys with Find, but the function is inconsistent. I'm not sure if the speed of having the mapkey "sometimes" is better or worse than the frustration when the mapkey won't work.
I too fight the excessively modal nature. To show or hide datum features is a simple, same looking button for Part, Assembly, Sketcher, and Drawing, but they are all different on the inside. A mapkey to turn them On and Off must have all 4 paradigms covered or it won't work all the time. PTC development must be very dysfunctional.
Perhaps as a workaround: Does anyone know how to use an IF statement with respect to the mode? Sketcher, Part, Assembly? If we can isolate the mode within the mapkey, then it won't go haywire when trying to stack the internal commands.
By the way @tbraxton , I like your previous post too. Thanks.
Yeah, the Search tool is your friend here. It's the only way to select things by name consistently. Might require some finangling to get it to work consistently, though. Don't think there is a way to use if statements in Mapkeys. The language is not meant to be used as a programming language (i.e. writing it by hand). It's just meant to record what you're doing.
You might also have some luck with using the search bar above the model tree. Write the full name and click the "+" button to select. But if there are multiple features with the same name (such as in parts in an assembly) this will select all of them.
Mapkeys, like relations, could really use some attention from developers, but I doubt that will happen.
I found my original post about plane selection in Widlfire.
Mapkeys: Wildfire has decreased productivity in so... - PTC Community
I'm on creo 7.0.3.0 but maybe this will help you.
I have axis A_1 and datums X, Y, Z. You can change the names searched for in each to match your planes/axis.
I'll be adding this to my github...at some point. https://github.com/Ballganda/ptc_creo_config_mapkeys
mapkey FA @MAPKEY_NAMESelects the axis named A_1;@MAPKEY_LABEL[FA]Select Axis A_1;\
~ Command `ProCmdMdlTreeSearch` ;\
~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\
~ Select `selspecdlg0` `LookByOptionMenu` 1 `Axis`;\
~ Select `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasNameComp` 1 ` == `;\
~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` `A_1`;\
~ Activate `selspecdlg0` `EvaluateBtn`;\
~ Activate `selspecdlg0` `ApplyBtn`;\
~ Activate `selspecdlg0` `CancelButton`;
mapkey FX @MAPKEY_NAMESelects the Plane X;@MAPKEY_LABEL[FX]Select Plane X;\
~ Command `ProCmdMdlTreeSearch` ;\
~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\
~ Select `selspecdlg0` `LookByOptionMenu` 1 `Datum Plane`;\
~ Select `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasNameComp` 1 ` == `;\
~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` `X`;\
~ Activate `selspecdlg0` `EvaluateBtn`;\
~ Activate `selspecdlg0` `ApplyBtn`;\
~ Activate `selspecdlg0` `CancelButton`;
mapkey FY @MAPKEY_NAMESelects the Plane Y;@MAPKEY_LABEL[FY]Select Plane Y;\
~ Command `ProCmdMdlTreeSearch` ;\
~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\
~ Select `selspecdlg0` `LookByOptionMenu` 1 `Datum Plane`;\
~ Select `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasNameComp` 1 ` == `;\
~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` `Y`;\
~ Activate `selspecdlg0` `EvaluateBtn`;\
~ Activate `selspecdlg0` `ApplyBtn`;\
~ Activate `selspecdlg0` `CancelButton`;
mapkey FZ @MAPKEY_NAMESelects the Plane Z;@MAPKEY_LABEL[FZ]Select Plane Z;\
~ Command `ProCmdMdlTreeSearch` ;\
~ Select `selspecdlg0` `SelOptionRadio` 1 `Feature`;\
~ Select `selspecdlg0` `LookByOptionMenu` 1 `Datum Plane`;\
~ Select `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasNameComp` 1 ` == `;\
~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` `Z`;\
~ Activate `selspecdlg0` `EvaluateBtn`;\
~ Activate `selspecdlg0` `ApplyBtn`;\
~ Activate `selspecdlg0` `CancelButton`;