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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

how to add model display transparency on/off toggle mapkey

dg-2
6-Contributor

how to add model display transparency on/off toggle mapkey

Model Display>Component Display Style>Transparent & shaded useing only one key.

required mapkey for toggle transparency on/off

10 REPLIES 10
TomasLoun
4-Participant
(To:dg-2)

It is not possible to do it by mapkey I think. You can only set the display style by macro, but to implement the toggle on/off functionality you have to test if the component is transparent or not. If it is transparent, you have to remember the current state and set the transparency. If it is already transparent, you have to restore previous (remembered) style. The problem is you cannot read the style by macro...

Jose_Costa
6-Contributor
(To:TomasLoun)

I think it's no possible too...

The best you can achieve is a combination of mapkeys like this:

mapkey $F2 %CP_SHADE;

mapkey CP_SHADE ~ Command `ProCmdViewShaded`; %&L1; %TRANSP; %&L2;

mapkey CP_TRANSP ~ Command `ProCmdViewTranspShaded`; %&L1; %SHADE; %&L2;

mapkey TRANSP ~ Update `add_opt` `EditPanel` `$F2 %CP_TRANSP`;

mapkey SHADE ~ Update `add_opt` `EditPanel` `$F2 %CP_SHADE`;

mapkey &L1 ~ 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 &L2 ~ Activate `add_opt` `EditPanel`;\

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

But I don't  know how to get the current state of the component.

Jose

TomasLoun
4-Participant
(To:Jose_Costa)

It should possible to solve it by Pro/Tookit by calling ProMdlVisibleAppearancepropsGet or wfcWSelecton::GetVisibleAppereance in OTK. So it requires to develop small auxiliary application

dg-2
6-Contributor
(To:dg-2)

Jose Costa‌ mapkey is not working. i need this as for in assembly part make individual selected part to be as transparent.

no im using two mapkeys for that as simply i need it for one key use.

mapkey tr ~ Command `ProCmdViewTranspShaded`;

mapkey ty ~ Command `ProCmdViewShaded`;

TomasLoun
4-Participant
(To:dg-2)

As I have written, it should be solved by a small Pro/Toolkit application...

Jose_Costa
6-Contributor
(To:dg-2)

I tested on Creo 3 M070 and it is working fine.

You just have to add to your config.pro, select a component and press F2 key.

It will toggle between shaded and tranparent.

Just copy paste from atached file.

Jose

Jose_Costa
6-Contributor
(To:Jose_Costa)

This is how I do it (schematic):

Create 3 mapkeys A, B and C.

mapkey A = mapkey B

Mapkey B = Shaded view and changes mapkey A to "mapkey A=mapkey C"

Mapkey C = Transparent view and changes mapkey A to "mapkey A=mapkey B"

That's it.

mapkey $F2 %CP_SHADE;

mapkey CP_SHADE ~ Command `ProCmdViewShaded`; ~ 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 %CP_TRANSP`;\

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

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

mapkey CP_TRANSP ~ Command `ProCmdViewTranspShaded`; ~ 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 %CP_SHADE`;\

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

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

Jose

dg-2
6-Contributor
(To:Jose_Costa)

your attachment mapkey works trans to shade only . its not working for shade to trans

TomU
23-Emerald IV
(To:dg-2)

Here are the mapkeys we use to do this.  Make sure the component(s) are selected before you attempt to change the style.

mapkey nsw @MAPKEY_NAMENew Style Wireframe;@MAPKEY_LABELNew Style Wireframe;\
mapkey(continued) ~ Command `ProCmdViewWireframe`;

mapkey nst @MAPKEY_NAMENew Style Transparent;@MAPKEY_LABELNew Style Transparent;\
mapkey(continued) ~ Command `ProCmdViewTranspShaded`;

mapkey ms @MAPKEY_NAMEMaster Style;@MAPKEY_LABELMaster Style;\
mapkey(continued) ~ Command `ProCmdViewVisTool` ;\
mapkey(continued) ~ Select `visual_dlg0` `RadioSelApplMgr` 1 `display style`;\
mapkey(continued) ~ Activate `visual_dlg0` `Table` 2 `master style` `name_column`;\
mapkey(continued) ~ Activate `visual_dlg0` `CloseBtn`;

TomU
23-Emerald IV
(To:TomU)

We also have something similar for on-the-fly simplified reps.  Just select the components and type "nr".  Very handy!

mapkey mr @MAPKEY_NAMEActivate Master Rep;@MAPKEY_LABELMaster Rep;\
mapkey(continued) ~ Command `ProCmdViewVisTool` ;\
mapkey(continued) ~ Select `visual_dlg0` `RadioSelApplMgr`1  `simplified rep`;\
mapkey(continued) ~ Activate `visual_dlg0` `Table`2  `master rep` `name_column`;\
mapkey(continued) ~ Activate `visual_dlg0` `CloseBtn`;

mapkey nr @MAPKEY_NAMECreate New Rep;@MAPKEY_LABELNew Rep;\
mapkey(continued) ~ Command `ProCmdViewNormalMaster`;\
mapkey(continued) ~ Command `ProCmdViewInclude`;

Top Tags