Skip to main content
TomU
23-Emerald IV
Mar 4, 2015 7:37 PM UTC
Question

Toggle Layer Tree Display in Creo Parametric 3.0

Curious if anyone has figured out how to toggle between the model tree and the layer tree in Creo Parametric 3.0.

 

We used the following mapkey in WF3 - WF5. It worked great.

 

mapkey $F2 @MAPKEY_NAMEDisplay Layer Tree;@MAPKEY_LABELDisplay Layer Tree;\

mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdViewLyrs.view`;

 

Creo 3 has changed the commands used to display the layer tree. So far I've been unable to figure out how to make them toggle. I would prefer to not use two separate mapkeys and/or constantly reload config files with alternate versions of the mapkey.

 

Thanks!


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.

6 replies

12-Amethyst
Mar 19, 2015 10:53 PM UTC

Hello,

I tried several ways, just editing the mapkeys text but I haven't found a solution too...

Unfortunately, it seems that now you need to recur to something like Autoit or AutoHotKey to achieve this (maybe PTC should include them in Creo installation? ).

I think that this can be done with a batch file too:

1 - A mapkey that calls a batch file, inside the b file a variable is toggled and it writes some text to a trail file.

2 - The mapkey ends reading the trailfile.

That should do it.

Jose.

Translate
12-Amethyst
Apr 10, 2015 9:03 PM UTC

Second attempt...

I made it just with mapkeys, but still not a elegant solution.

Paste the mapkeys in your config pro and call mapkey "L".

Translate
12-Amethyst
Apr 10, 2015 10:40 PM UTC

Great!!

I made a mapkey to hide and show specific layers with just one click using the previous method. And is easy to replicate just changing the layer name in the code:

2015-04-10 23_33_05-C__moldes_layer-toggle3.pro - SciTE [1 of 3].png

Translate
2-Explorer
Apr 10, 2015 11:26 PM UTC

Just to note - the mapkey can reload the alternate config and the alternate config can be a single mapkey. I make them text files, named for what they do, like mapkey_feature_on.txt and mapkey_feature_off.txt. Each one ends with the commands to load the other one.

Translate
12-Amethyst
Apr 11, 2015 7:15 AM UTC

Yes, I do know that.

Currently I have some working that way.

I´m just testing other methods since that mapkeys tend to stop working sometimes in some computers.

Thanks anyway.

Jose

Translate
12-Amethyst
May 18, 2016 9:03 PM UTC

My best solution until now:

mapkey $F2 %la_hide;

mapkey la_hide ~ Command `ProCmdViewLyrs`  0;\

mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg` ;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\

mapkey(continued) ~ Input `add_opt` `InputOpt` `mapkey`; ~ Update `add_opt` `InputOpt` `mapkey`;\

mapkey(continued) ~ Activate `add_opt` `InputOpt`;~ FocusOut `add_opt` `InputOpt`;\

mapkey(continued) ~ Update `add_opt` `EditPanel` `$F2 %la_show`;\

mapkey(continued) ~ Activate `add_opt` `EditPanel`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;

mapkey la_show ~ Command `ProCmdViewLyrs`  1;\

mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg` ;\

mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.AddOpt`;\

mapkey(continued) ~ Input `add_opt` `InputOpt` `mapkey`; ~ Update `add_opt` `InputOpt` `mapkey`;\

mapkey(continued) ~ Activate `add_opt` `InputOpt`;~ FocusOut `add_opt` `InputOpt`;\

mapkey(continued) ~ Update `add_opt` `EditPanel` `$F2 %la_hide`;\

mapkey(continued) ~ Activate `add_opt` `EditPanel`;\

mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;

It works great on my computer, and it's a more simple way.

Translate