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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Toggle Layer Tree Display in Creo Parametric 3.0

TomU
23-Emerald IV

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 6
Jose_Costa
6-Contributor
(To:TomU)

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.

Jose_Costa
6-Contributor
(To:TomU)

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".

Jose_Costa
6-Contributor
(To:TomU)

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

dschenken
21-Topaz I
(To:TomU)

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.

Jose_Costa
6-Contributor
(To:dschenken)

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

Jose_Costa
6-Contributor
(To:TomU)

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.

Top Tags