Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creo2 mapkey to append relations

  • Thread starter Thread starter healre
  • Start date Start date
H

healre

Guest
New to Creo2 from WF5 and had a mapkey that would append relations to existing model relations.
In Creo2, I can only get the mapkey to copy over all the relations, rather than append.
In WF5, we used:
Any one know of any options to append additional relations to a model using a mapkey?
In WF5 we used to use the syntax:
mapkey appi ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_util_pref`;\
mapkey(continued) ~ Input `preferences` `InputOpt` `new_relation_ui`;\
mapkey(continued) ~ Update `preferences` `InputOpt` `new_relation_ui`;\
mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences` `EditPanel`;\
mapkey(continued) ~ Close `preferences` `EditPanel`;~ Select `preferences` `EditPanel`1 `no`;\
mapkey(continued) ~ Activate `preferences` `AddOpt`;~ FocusOut `preferences` `InputOpt`;\
mapkey(continued) ~ Activate `preferences` `ApplySave`;~ FocusOut `preferences` `InputOpt`;\
mapkey(continued) ~ Activate `preferences` `Close`;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_rels`;#ADD;\
mapkey(continued) /******************************************************;\
mapkey(continued) /* The information contained in the following relations;\

and then numerous relations followed.

Anyone know if a way to append relations (not copy over the existing relations) to the existing model relations using a mapkey?
 
My advice would be to open the relations editor, move the cursor to where you want to place the relations, then create a mapkey with the relations.
It will take more effort than the way you currently do it, but it ensures that you don't override any relations.
 
I add relations to an existing model using a mapkey. In fact it's the old mapkey from a much older version. You have to change the config option new_parameter_ui to NO then the mapkey works, then change it back when completed to use the newer UI. I have it setup to add the parameters and designate them. If they already exist, it doesn't overwrite them.
 
Hi, Do you the config file edit as part of the mapkey?
 
I don't do the config file edit as part of the mapkey but I suppose you could. I have never tried it.
 
New to Creo2 from WF5 and had a mapkey that would append relations to existing model relations.
In Creo2, I can only get the mapkey to copy over all the relations, rather than append.
In WF5, we used:
Any one know of any options to append additional relations to a model using a mapkey?
In WF5 we used to use the syntax:
mapkey appi ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_util_pref`;\
mapkey(continued) ~ Input `preferences` `InputOpt` `new_relation_ui`;\
mapkey(continued) ~ Update `preferences` `InputOpt` `new_relation_ui`;\
mapkey(continued) ~ FocusOut `preferences` `InputOpt`;~ Open `preferences` `EditPanel`;\
mapkey(continued) ~ Close `preferences` `EditPanel`;~ Select `preferences` `EditPanel`1 `no`;\
mapkey(continued) ~ Activate `preferences` `AddOpt`;~ FocusOut `preferences` `InputOpt`;\
mapkey(continued) ~ Activate `preferences` `ApplySave`;~ FocusOut `preferences` `InputOpt`;\
mapkey(continued) ~ Activate `preferences` `Close`;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_rels`;#ADD;\
mapkey(continued) /******************************************************;\
mapkey(continued) /* The information contained in the following relations;\

and then numerous relations followed.

Anyone know if a way to append relations (not copy over the existing relations) to the existing model relations using a mapkey?


I tried to do the exact same thing some years ago. I came up with a similar mapkey. What I tried to do is to into the relations is to save the current file externally to a temporary file, add the new relations (also from a text file), and then add the original relations back in. I don't believe I finished this quest.

Assuming the above doesn't work, If you can execute a .bat file from within the mapkey to add the 2 text files together, you might try that approach.

The trick is to find a way to add the new relations without deleting the existing relations.

Let me know if you find something that works
 

Part and Inventory Search

Sponsor

Back
Top