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

Mapkey to add "TYP" to dimension text (Creo 4)

SOLVED
Highlighted
Participant

Mapkey to add "TYP" to dimension text (Creo 4)

In a drawing (creo 4), I want to create a Mapkey to add "TYP" in dimension text. Everytime I try this, my Mapkey only work in the drawing I create it. Someone to help me ? Does anybody is able to add dimension text with a Mapkey ? 

Thank you for your help ! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

 

Try this!

 

mapkey typ @MAPKEY_NAMEADD TYP TO DIMENSION;@MAPKEY_LABELADD_TYP;\

mapkey(continued) ~ Activate `main_dlg_cur` `Dimension_Properties:ProCmdPmaChkSldPnlDimTxt`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Update `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Dimension_Properties:ProCmdPmaChkSldPnlDimTxt` 0;

 

Mart

; )

View solution in original post

18 REPLIES 18
Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

The use of 'TYP' is not a valid nomenclature for repetitive dimensions according to ASME Y14.5-2009.

See section 1.9.5 in the standard for how to properly dimension repetitive values.

It is also not valid in ANSI Y14.5M-1982 and ASME Y14.5M-1994.

 

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

1.9.5 says, "Repetitive features or dimensions may be specified by the use of an X in conjunction with a number to indicate the "number of places" required."  Notice it says the word "may", not "must" or "shall".  Is there somewhere else in the standard that actually prohibits the use of "typical" (or "unless otherwise specified")?

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

I think it comes from the interpretation "may". For the 1982 standard "may" indicated a recommended practice. The interpretation has changed. For the 1994 standard the interpretation of "may" indicated an accepted practice. The interpretation was changed in Nov. 2017 to indicate an allowed practice. My understanding is you have three options: 1) dimension all individually, 2) use repetitive feature dimension, and 3) a general note. The standard that specifies the definition is Y14.100 section 1.3. Another difference is "must" is not used to indicate a mandatory requirement only "shall" and "will".

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Is it only working on that one drawing or in that one session of Creo?

If only on that one session of Creo, then following questions:

Are you saving the mapkey to the config.pro? In the past, there has been issues with saving mapkeys.

Also, did you save the mapkey to the correct config.pro, you may have more than one, based on your company.

 

If only on that one drawing, can you copy and paste your mapkey to the forum?


Steve Williams
Pro/E Version 15/16 (Circa 1995/1996)
Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Only work in one drawing and I'm sure to saved the mapkey at the right place. Here is the mapkey, dimension is selected before I run it.

 

mapkey typ @MAPKEY_NAMEADD TYP TO DIMENSION;@MAPKEY_LABELADD_TYP;\
mapkey(continued) ~ Command `ProCmdPmaChkSldPnlDimTxt` 1;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` \
mapkey(continued) `RibbonPanelsOnActivate_ProCmdPmaChkSldPnlDimTxt` \
mapkey(continued) `main_dlg_w1/Dimension_Properties:ProCmdPmaChkSldPnlDimTxt/`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D `;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D T`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TY`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Update `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Command `ProCmdPmaChkSldPnlDimTxt` 0;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` \
mapkey(continued) `RibbonPanelsOnActivate_ProCmdPmaChkSldPnlDimTxt` \
mapkey(continued) `main_dlg_w1/Dimension_Properties:ProCmdPmaChkSldPnlDimTxt/`;

 

Thank you ! 

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Well, I'm not running Creo 4 so testing your mapkey was a bust.

I created a creo 3 version and it seemed to work across at least 2 different drawings.

FYI, it was a quick mapkey, so it looks like there is some trash in there but I didn't want to re-create it just to clean it up.

 

mapkey typ ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;\
mapkey(continued) ~ Command `ProCmdEditProperties@PopupMenuGraphicWinStack` ;\
mapkey(continued) ~ Select `mod_dim_new_asynch` `tab_main` 1 `lay_display`;\
mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `@D `;\
mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `@D T`;\
mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `@D TY`;\
mapkey(continued) ~ Input `mod_dim_new_asynch` `txt_dim_text` `@D TYP`;\
mapkey(continued) ~ Update `mod_dim_new_asynch` `txt_dim_text` `@D TYP`;\
mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ FocusIn `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ FocusOut `mod_dim_new_asynch` `txt_dim_text`;\
mapkey(continued) ~ Activate `mod_dim_new_asynch` `psh_ok`;


Steve Williams
Pro/E Version 15/16 (Circa 1995/1996)
Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Thank for your help, but the way to add text to a dimension in Creo3 is not the same in Creo4. 

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

There is nothing drawing specific in the mapkey you posted. But if you don't have the same menus available in the other drawing as you have available in the one it was created in, the mapkey won't work. All a mapkey does is replay the sequence you chose; so if the tab selection is different or the filters are different or some other setting is different that affects which menus are displayed, then the mapkey won't work.

 

I would try recording the mapkey in the other drawing and compare the two.

 

You can also edit out redundant info from mapkeys to make them more readable and shorter; for example:

 

mapkey typ @MAPKEY_NAMEADD TYP TO DIMENSION;@MAPKEY_LABELADD_TYP;\
mapkey(continued) ~ Command `ProCmdPmaChkSldPnlDimTxt` 1;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` \
mapkey(continued) `RibbonPanelsOnActivate_ProCmdPmaChkSldPnlDimTxt` \
mapkey(continued) `main_dlg_w1/Dimension_Properties:ProCmdPmaChkSldPnlDimTxt/`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Update `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Command `ProCmdPmaChkSldPnlDimTxt` 0;\
mapkey(continued) ~ Trail `UI Desktop` `UI Desktop` \
mapkey(continued) `RibbonPanelsOnActivate_ProCmdPmaChkSldPnlDimTxt` \
mapkey(continued) `main_dlg_w1/Dimension_Properties:ProCmdPmaChkSldPnlDimTxt/`;

 

This takes out most of the 'Input' lines that are just recording each character as it's added. As far as I know that isn't required.

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Thanks for your help...

 

The problem is to open the popup box "Dimension Text" The only way the mapkey can work, is when I put the button "Dimension Text" in the Quick Access Toolbar and use it for the mapkey... 

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

 

Try this!

 

mapkey typ @MAPKEY_NAMEADD TYP TO DIMENSION;@MAPKEY_LABELADD_TYP;\

mapkey(continued) ~ Activate `main_dlg_cur` `Dimension_Properties:ProCmdPmaChkSldPnlDimTxt`;\
mapkey(continued) ~ Input `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Update `ProCmdPmaChkSldPnlDimTxt__panel` `PH.dim_txt_area` `@D TYP.`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Dimension_Properties:ProCmdPmaChkSldPnlDimTxt` 0;

 

Mart

; )

View solution in original post

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Salut Martin,

 

Merci pour l'essai mais ça ne semble pas marcher de mon côté.

 

La seule façon que j'ai trouvé à date qui marche, c'est en ajoutant le piton "Dimension Text" dans la barre d'acces rapide et en passant par ce piton quand je fais ma mapkey... Sinon rien ne marche.

 

Merci encore et bonne journée !!!

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

C'est curieux parce-que j'avais le même problème et j'ai fait fonctionner mon mapkey de cette facon là.

 

Parce-que le problème dans ton mapkey se situe dans les lignes qui utilisent: main_dlg_w1

 

 

Ca réfère au nombre de fenêtre active en cours:

 

2018-03-14 13_17_46-.png

 

Lorsque tu as créé ton mapkey, ton DRW était la fenêtre 1.

 

C'est pour cette raison que si tu est dans ton dessin (piece2.drw) et qu'il se trouve dans la 2ème fenêtre (ou 3, 4, 5, etc...) ca ne fonctionnera pas. 

 

Mais aussitot que ton dessin va se trouver dans la 1ère fenêtre ton mapkey va fonctionner.

 

Tu peux faire le test en changeant dans ton mapkey: main_dlg_w1 pour main_dlg_w2.

 

Ensuite ouvre une nouvelle seesion Creo, ouvre la pièce PRT en premier, ouvre le dessin de la pièce DRW en 2ème et ton mapkey va fonctionner.

 

C'est  pour cette raison que j'ai retravailler mon mapkey en éliminant cette variable et ca fonctionne peu importe à quelle position la fenêtre de mon DRW est ouverte.

 

Bonne chance!

 

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Finalement, ça marche très bien !

 

Le problème c'est que j'ai copier/coller ta mapkey sans changer les :P.... Pas fort !

 

Merci pour ton aide !!!!

 

Maxime

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Haha...super!

 

Effectivement le traitement de texte du forum n'aide pas vraiment...à transformer du texte automatiquement à des emojis...

 

; )

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Auf English** translation (because it's of general interest to mapkey makers) of  MartinLaliberte's post.

 

It's strange because I had the same problem and I made my mapkey work that way.
Because the problem in your mapkey is in the lines that use: main_dlg_w1
It refers to the number of active windows in progress:
When you created your mapkey, your DRW was window 1.
It is for this reason that if you are in your drawing (piece2.drw) and it is in the 2nd window (or 3, 4, 5, etc ...) it will not work.
But as soon as your drawing is in the first window your mapkey will work.
You can do the test by changing in your mapkey: main_dlg_w1 for main_dlg_w2.
Then open a new Creo session, open the PRT piece first, open the drawing of the DRW piece in 2nd and your mapkey will work.
That's why I reworked my mapkey by eliminating this variable and it works no matter what position the window of my DRW is open.

Good luck!

 

**Joking - it's actually from French.

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

Yeah, sorry!

 

Did not realize when I wrote my reply!

 

Your translation is right on!

 

Thanks @dschenken

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

I don't recall ever having a problem saving a mapkey. I have sometimes failed to select the correct pull-down to put the mapkey in a particular file; I never saved them to a .pro file except for one mapkey that loaded the mapkeys in a file called mapkey.txt from a location outside the Creo install directory. This avoids them being overwritten by the admin.

 

Mixing config items with mapkeys ends up with a management mess. In a *.txt file it is easy to pop it open with Notepad and make adjustments without worry of accidentally changing critical functionality.

 

I wonder if the failure to work on other drawings actually is a failure to be in the correct mode for the drawing. The mapkey won't record all the mode information.

Highlighted

Re: Mapkey to add "TYP" to dimension text (Creo 4)

For me, saving mapkey problems usually come down to user error, I forget to save.

As far as managing mapkeys, if I had a choice, I would not have company settings in the same config as user settings. My user config would be relatively simplistic and I would simply just keep it organized. 

 


Steve Williams
Pro/E Version 15/16 (Circa 1995/1996)
Announcements