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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

mapkeys for multiple modes

davehaigh
12-Amethyst

mapkeys for multiple modes

Anyone know of another way to do this?

Orginally I created mapkeys like this:
mapkey af @MAPKEY_LABELAll Datums Off;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
all_check` 0;\

mapkey ao @MAPKEY_LABELAll Datums On;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
all_check` 1;\

You will notice hi-lited in yellow it shows the Mode that you are in when you recorded the mapkey. It will not work in other modes.

The fix requires adding additional lines so this works in part, assy, and drawing modes. I'd prefer not to have to do this. I'd like the mapkey to work in any mode. Any ideas?

mapkey af @MAPKEY_LABELAll Datums Off;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
all_check` 0;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
all_check` 0;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
all_check` 0;

mapkey ao @MAPKEY_LABELAll Datums On;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
all_check` 1;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
all_check` 1;\
~ Activate `main_dlg_cur` \
`igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
all_check` 1;



David Haigh
Phone: 925-424-3931
Fax: 925-423-7496
Lawrence Livermore National Lab
7000 East Ave, L-362
Livermore, CA 94550


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.
11 REPLIES 11

Try this.


mapkey ed @MAPKEY_NAMEToggle Datum Planes;@MAPKEY_LABELED;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_util_env`;\
mapkey(continued) ~ Activate `env_dlg` `DtmDsply_PB_DtmPlanes`0 ;~ Activate `env_dlg` `OK_`;

John Bennett
Cad Business Administrator
(801)513-9001
RandyJones
19-Tanzanite
(To:davehaigh)

On 01/02/13 13:38, Haigh, David A. wrote:
>
> Anyone know of another way to do this?
>

To hide/show all datums you can use this:
mapkey af @MAPKEY_LABELAll Datums Off;\
~ Command `ProCmdEnvAxisDisp`  0;\
~ Command `ProCmdEnvPntsDisp`  0;\
~ Command `ProCmdEnvCsysDisp`  0;\
~ Command `ProCmdEnvDtmDisp`  0;

mapkey ao @MAPKEY_LABELAll Datums On;\
~ Command `ProCmdEnvAxisDisp`  1;\
~ Command `ProCmdEnvPntsDisp`  1;\
~ Command `ProCmdEnvCsysDisp`  1;\
~ Command `ProCmdEnvDtmDisp`  1;

Which is what you get by selecting each datum type individually instead of the "Select All" checkbox.
I would say PTC has a bug with the "Select All" mapkey recording.

> Orginally I created mapkeys like this:
>
> mapkey af @MAPKEY_LABELAll Datums Off;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>
> all_check` 0;\
>
> mapkey ao @MAPKEY_LABELAll Datums On;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>
> all_check` 1;\
>
> You will notice hi-lited in yellow it shows the Mode that you are in when you recorded the mapkey. It will not work in other modes.
>
> The fix requires adding additional lines so this works in part, assy, and drawing modes. I'd prefer not to have to do this. I'd like the mapkey to work in any mode. Any ideas?
>
> mapkey af @MAPKEY_LABELAll Datums Off;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>
> all_check` 0;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
>
> all_check` 0;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
>
> all_check` 0;
>
> mapkey ao @MAPKEY_LABELAll Datums On;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>
> all_check` 1;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
>
> all_check` 1;\
>
> ~ Activate `main_dlg_cur` \
>
> `igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
>
> all_check` 1;
>
> David Haigh
> Phone: 925-424-3931
> Fax: 925-423-7496
> Lawrence Livermore National Lab
> 7000 East Ave, L-362
> Livermore, CA 94550
>
>
> ----------


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
   Fax: 785-667-2695
------------------------------------------------------------------------

RandyJones
19-Tanzanite
(To:davehaigh)

On 01/02/13 14:40, Randy Jones wrote:
> On 01/02/13 13:38, Haigh, David A. wrote:
>>
>> Anyone know of another way to do this?
>>
>
> To hide/show all datums you can use this:
> mapkey af @MAPKEY_LABELAll Datums Off;\
> ~ Command `ProCmdEnvAxisDisp` 0;\
> ~ Command `ProCmdEnvPntsDisp` 0;\
> ~ Command `ProCmdEnvCsysDisp` 0;\
> ~ Command `ProCmdEnvDtmDisp` 0;
>
> mapkey ao @MAPKEY_LABELAll Datums On;\
> ~ Command `ProCmdEnvAxisDisp` 1;\
> ~ Command `ProCmdEnvPntsDisp` 1;\
> ~ Command `ProCmdEnvCsysDisp` 1;\
> ~ Command `ProCmdEnvDtmDisp` 1;

I just noticed the above mapkeys actually work as a toggle (at least in WF5 and Creo 2.0). Which may or may not be good.

>
> Which is what you get by selecting each datum type individually instead of the "Select All" checkbox.
> I would say PTC has a bug with the "Select All" mapkey recording.
>
>> Orginally I created mapkeys like this:
>>
>> mapkey af @MAPKEY_LABELAll Datums Off;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 0;\
>>
>> mapkey ao @MAPKEY_LABELAll Datums On;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 1;\
>>
>> You will notice hi-lited in yellow it shows the Mode that you are in when you recorded the mapkey. It will not work in other modes.
>>
>> The fix requires adding additional lines so this works in part, assy, and drawing modes. I'd prefer not to have to do this. I'd like the mapkey to work in any mode. Any ideas?
>>
>> mapkey af @MAPKEY_LABELAll Datums Off;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 0;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 0;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 0;
>>
>> mapkey ao @MAPKEY_LABELAll Datums On;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh407412841.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 1;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh396938342.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 1;\
>>
>> ~ Activate `main_dlg_cur` \
>>
>> `igToolbar_AncestorIGT_IGT_GRP_inh397369119.proe_win|.mcs29658718_mp|select_\
>>
>> all_check` 1;
>>
>> David Haigh
>> Phone: 925-424-3931
>> Fax: 925-423-7496
>> Lawrence Livermore National Lab
>> 7000 East Ave, L-362
>> Livermore, CA 94550
>>
>>
>> -----End Original Message-----
>
>
> --
> ------------------------------------------------------------------------
> Randy Jones
> Systems Administrator
> Great Plains Mfg., Inc.
> 1525 E North St
> PO Box 5060
> Salina, KS USA 67401
> email:-
> Phone: 785-823-3276
> Fax: 785-667-2695
> ------------------------------------------------------------------------
>
> -----End Original Message-----


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
Fax: 785-667-2695
------------------------------------------------------------------------

Creo 2. -- Our WF4 mapkey works in all modes also.

David Haigh

So a couple observations here.
I already have mapkeys to toggle the individual settings. The toggle behavior is good for the indvidual datums. Because you know what ever state it's in, will change. However when trying to set all of them to off or on, toggling each one individually is no good because currently you may have datum planes on and axes off, toggling them all will just switch that to planes off, axes on.

You really need a positive on/off if your trying to turn everything on or off. This is useful if you want to call this mapkey in another mapkey, for example to make a plot of a model. The mapkey I sent works, I just don't like having to do it that way.

By the way, for future reference, these are the modes associated with this syntax:
igToolbar_AncestorIGT_IGT_GRP_inh397369119 = Assy Mode
igToolbar_AncestorIGT_IGT_GRP_inh407412841 = Drawing Mode
igToolbar_AncestorIGT_IGT_GRP_inh396938342 = Part Mode

I opened a call with PTC and just got off the phone with them. He'll run it up the flag pole and see if there's another way to do this.

David Haigh

I've had pretty good luck with this mapkey below. It, (so far) has worked in all 3 modes that you listed.
Been using it in Creo 1 m40...

mapkey $F7 @MAPKEY_LABELTOGGLE DATUM;~ Command `ProCmdEnvDtmDisp` 0;\
mapkey(continued) nd `ProCmdEnvDtmDisp` 0;

Hope it helps - Have a good day all

So I have a better solution now.

A few additional concerns were pointed out to me privately:
We additionally have manufacturing and mold design syntax added.
Two more issues I found:

1. If you move the location of the In-graphics-Toolbar to the status bar, the syntax is different again 😞

2. You have to deal with the datum tags separately. If a user switches them off manually for some reason and uses the on/off mapkey afterwards, the tags might not appear.
I think Brad Sessions idea of loading a config file to set the display of these it the best answer.

My mapkeys now look like this and work in any mode. You will want to adjust the path to suit your environment. The configs are attached.

mapkey af @MAPKEY_LABELAll Datums Off;\
~ Command `ProCmdRibbonOptionsDlg` ;\
~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\
~ Activate `ribbon_options_dialog` `ConfigLayout.Open`;\
~ Update `file_open` `Inputname` `P:\\mapkey_configs\\datums_no.pro`;\
~ Command `ProFileSelPushOpen@context_dlg_open_cmd` ;\
~ Activate `ribbon_options_dialog` `OkPshBtn`;\
~ FocusIn `UITools Msg Dialog Future` `no`;\
~ Activate `UITools Msg Dialog Future` `no`;

mapkey ao @MAPKEY_LABELAll Datums On;\
~ Command `ProCmdRibbonOptionsDlg` ;\
~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\
~ Activate `ribbon_options_dialog` `ConfigLayout.Open`;\
~ Update `file_open` `Inputname` `P:\\mapkey_configs\\datums_yes.pro`;\
~ Command `ProFileSelPushOpen@context_dlg_open_cmd` ;\
~ Activate `ribbon_options_dialog` `OkPshBtn`;\
~ FocusIn `UITools Msg Dialog Future` `no`;\
~ Activate `UITools Msg Dialog Future` `no`;

David Haigh

David,

The issue really stems from the fact that PTC has not yet included or implemented either;
1. A ProCmdXXXX resource for the "Select all" of the display filters. This means you cannot do a mapkey based on the syntax: Command `[some command]`
2. PTC as of Creo 2 has yet to allow a location for users to place persistent commands across modes. I think there was some discussion a while back about allowing users to decide where or what modes a new tab or command appears in or at a minimum allowing user to place items in the "File" tab which is persistent.

I was also very surprised that the explicit command using 0's or 1's did not work and rather acted as a toggle (per your original note). That seems like a bug to me. I also tested just to make sure that was what was happening. Very, very strange PTC.

The reason it is so strange is because in most if not all other areas 0's or 1's simply indicate on or off. With that said another option to consider, so you do not have to carry additional config.pro's (i.e. datums_no.pro, datums_yes.pro), is to execute the commands through the File|Options|Entity Display. This way the mapkey is persistent and should be robust.

Here is my example:

mapkey tdr @MAPKEY_NAMEDatums off;@MAPKEY_LABELToggle Datums Off;\
~ Select `main_dlg_cur` `appl_casc`;~ Close `main_dlg_cur` `appl_casc`;\
~ Command `ProCmdRibbonOptionsDlg` ;\
~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `DisplayObjLayout`;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_planes.lay_instance` 0;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_axes.lay_instance` 0;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.datum_point_display.lay_instance` 0;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_coord_sys.lay_instance` 0;\
~ Activate `ribbon_options_dialog` `OkPshBtn`;\
~ FocusIn `UITools Msg Dialog Future` `no`;\
~ Activate `UITools Msg Dialog Future` `no`;


mapkey tdg @MAPKEY_NAMEDatums on;@MAPKEY_LABELToggle Datums On;\
~ Select `main_dlg_cur` `appl_casc`;~ Close `main_dlg_cur` `appl_casc`;\
~ Command `ProCmdRibbonOptionsDlg` ;\
~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `DisplayObjLayout`;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_planes.lay_instance` 1;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_axes.lay_instance` 1;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.datum_point_display.lay_instance` 1;\
~ Activate `ribbon_options_dialog` \
`DisplayObjLayout.display_coord_sys.lay_instance` 1;\
~ Activate `ribbon_options_dialog` `OkPshBtn`;\
~ FocusIn `UITools Msg Dialog Future` `no`;\
~ Activate `UITools Msg Dialog Future` `no`;

Take care,
Tim McLellan
Mobius Innovation and Development, Inc.

Actually I'm ok with carrying extra config files, two more is no big deal. Loading extra configs is the only way to change some behaviors of ProE/Creo in session. I consider this just the price of doing business with PTC.

I have all of the following extra configs:
Mapkey ou --> P:\mapkey_configs\new_ui_no.pro --> Load Old Parameter/Relation UI
Mapkey nu --> P:\mapkey_configs\new_ui_yes.pro --> Load New Parameter/Relation UI
Mapkey .ddn --> P:\mapkey_configs\dependency_no.pro --> Set Fix Drawing Dependency no
Mapkey .ddcs --> P:\mapkey_configs\dependency_yes_cs_no.pro --> Set Fix Drawing Dependency yes no CS
Mapkey .ddy --> P:\mapkey_configs\dependency_yes.pro --> Set Fix Drawing Dependency yes
Mapkey .fif --> P:\mapkey_configs\fractions-config.pro --> Set Feet inches fractions
Mapkey .penm --> P:\mapkey_configs\release_pens.pro --> Set Pens for Mono
Mapkey .penc --> P:\mapkey_configs\release_pens_color.pro --> Set Pens for Color
Mapkey .penab --> P:\mapkey_configs\ab_pens.pro --> Set Pens for A or B size
Mapkey .owd --> P:\mapkey_configs\working.pro --> Open Defaults to Working Dir
Mapkey .ows --> P:\mapkey_configs\workspace.pro --> Open Defaults to Workspace
Mapkey af --> P:\mapkey_configs\datums_no.pro --> All Datums Off
Mapkey ao --> P:\mapkey_configs\datums_yes.pro --> All Datums On

As you can see from the path I just put all these extra configs in a common directory on our server.

David Haigh

I don’t mean to hijack this thread, but I noticed something in your config
files scenario that sparked my interest.



We are currently testing WC 10.1, and I ran onto the necessity for the
Drawing Dependency fix with the FIRST “old” drawing that I tried checking
into WC. Once I figured this out, fixing the issue wasn’t really a big
deal.



My question, though, is this: Why wouldn’t you leave the fix drawing
dependency set to yes all the time? Doesn’t it only fix “broken” links in
the drawing, and if they’re broken don’t they need to be fixed anyways?



The PTC documentation indicates that you should turn this on ONLY when you
need it, and off when you don’t. I’m trying to understand why that is the
case. With that being said, I am a total green-horn when it comes to
checking drawings into WC, so I do NOT know all of the pitfalls that I
will encounter one way or the other



Darrin,
So since the conversation had digressed to extra configs, I only posted the extra configs I have. I didn't say how I use them.

So here's the deal. In my config.pro that gets loaded when ProE starts, fix drawing dependency is turned off. I have added menus in WildFire 4 that the users can select if they have a drawing dependency issue. That menu loads the config file which changes the behavior of ProE, and allows them to then fix the dependency problem. Then they can set it back to off using the other menu.

David Haigh
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags