Skip to main content
Mar 20, 2018 6:00 AM UTC
Solved

Rename Datum plane using mapkey

Hi everyone,

 i required Rename Datum plane using mapkey. i using method record mapkey

FIND >> (LookFor)DATUMPLANE >> (Value)Req Datum Name.

this way some times not working.

 

FYI. See my reply image 

 

in mapkey scripted as per below.

 search "top" datum plane and rename as "xtop"

but in trail.txt it shows mapkey ended with only search. so its not able to do "redfine" or "editproperties" command.

 

help!!! urgent requirement.

jbobAnswer
Mar 20, 2018 2:41 PM UTC

try this mapkey

mapkey r/d @MAPKEY_NAMErename top datum plane;@MAPKEY_LABELrename datum;\
mapkey(continued) ~ Command `ProCmdMdlTreeSearch` ;~ Open `selspecdlg0` `SelOptionRadio`;\
mapkey(continued) ~ Close `selspecdlg0` `SelOptionRadio`;\
mapkey(continued) ~ Select `selspecdlg0` `SelOptionRadio` 1 `Datum`;\
mapkey(continued) ~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` \
mapkey(continued) `TOP`;~ Activate `selspecdlg0` `EvaluateBtn`;\
mapkey(continued) ~ Activate `selspecdlg0` `ApplyBtn`;~ Activate `selspecdlg0` `CancelButton`;\
mapkey(continued) ~ Command `ProCmdRedefine` ;~ Select `Odui_Dlg_00` `pg_vis_tab` 1 `tab_3`;\
mapkey(continued) ~ Input `Odui_Dlg_00` `t3.datum_plane_name` `xtop`;\
mapkey(continued) ~ Update `Odui_Dlg_00` `t3.datum_plane_name` `xtop`;\
mapkey(continued) ~ FocusOut `Odui_Dlg_00` `t3.datum_plane_name`;\
mapkey(continued) ~ Activate `Odui_Dlg_00` `stdbtn_1`;

11 replies

Mar 20, 2018 6:16 AM UTC

A) Fails to run the Find command

B) Fails to find the Datum

C) Fails in some other way - please describe

 

Also, include the contents of the Mapkey that is supposed to do this and

the Version of Creo this is supposed to do this for and

does this work on Parts and not Assemblies or it works on Assemblies and not Parts

 

 

dg-2Author
Mar 20, 2018 6:24 AM UTC

Mapkey run full length its not failing, but its not rename desired plane.end with selection mode.

dg-2Author
Mar 20, 2018 12:13 PM UTC

i checked trail.txt file mapkey not run the full script

MAPKEY

dg-2Author
Mar 20, 2018 12:17 PM UTC

Trail txt image.

FYI. See above image and this image attachment also.

 

in mapkey scripted as per below.

 search "top" datum plane and rename as "xtop"

but in trail.txt it shows mapkey ended with only search. so its not able to do "redfine" or "editproperties" command.

 

help!!! urgent requirement.

jbobAnswer
Mar 20, 2018 2:41 PM UTC

try this mapkey

mapkey r/d @MAPKEY_NAMErename top datum plane;@MAPKEY_LABELrename datum;\
mapkey(continued) ~ Command `ProCmdMdlTreeSearch` ;~ Open `selspecdlg0` `SelOptionRadio`;\
mapkey(continued) ~ Close `selspecdlg0` `SelOptionRadio`;\
mapkey(continued) ~ Select `selspecdlg0` `SelOptionRadio` 1 `Datum`;\
mapkey(continued) ~ Update `selspecdlg0` `ExtRulesLayout.ExtBasicNameLayout.BasicNameList` \
mapkey(continued) `TOP`;~ Activate `selspecdlg0` `EvaluateBtn`;\
mapkey(continued) ~ Activate `selspecdlg0` `ApplyBtn`;~ Activate `selspecdlg0` `CancelButton`;\
mapkey(continued) ~ Command `ProCmdRedefine` ;~ Select `Odui_Dlg_00` `pg_vis_tab` 1 `tab_3`;\
mapkey(continued) ~ Input `Odui_Dlg_00` `t3.datum_plane_name` `xtop`;\
mapkey(continued) ~ Update `Odui_Dlg_00` `t3.datum_plane_name` `xtop`;\
mapkey(continued) ~ FocusOut `Odui_Dlg_00` `t3.datum_plane_name`;\
mapkey(continued) ~ Activate `Odui_Dlg_00` `stdbtn_1`;

dg-2Author
Mar 21, 2018 4:33 AM UTC

Thank you so much.

its working Great.

let me know whats mistake of mine. 

Mar 21, 2018 6:05 AM UTC

Nice.