How to open the Generic from an instance with mapkeys only.
With a little workaround it is possible in Pro-E mapkeys only (without scripts and all):
Record a mapkey of this (withan instance open):
Make new "dummy" drw named "to-be-deleted.drw", The instance will default be model. Now replace model (file properties ....) The Generic will default be the new model. Now OPEN, and the drw model opens default. Finally open "to-be-deleted.drw", and erase from session.
So now if you have an instance open type rg and the generic openes. Simple??
It works for parts AND assemblies
In config.pro it looks like this: Youjust copy-paste if you use Wildfire3 or 4. Please give some feedback if it works for you or not. So far I had no negative responce.
Works also if you use Pro-e in another language!
mapkey rg @MAPKEY_LABELretreive generic from instance;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `File`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;~ Activate `main_dlg_cur` `File.psh_new`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;~ Input `new` `InputPanel1` `to_be_deleted`;\
mapkey(continued) ~ Update `new` `InputPanel1` `to_be_deleted`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ FocusIn `UI Message Dialog` `ok`;~ Activate `UI Message Dialog` `ok`;\
mapkey(continued) ~ FocusIn `dwg_create` `inp_model_name`;~ Activate `dwg_create` `psh_ok`;\
mapkey(continued) ~ Activate `open_instance` `open`;~ Activate `open_rep` `OK`;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `File`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `File.psh_properties`;#DRAWING MODELS;#REPLACE;\
mapkey(continued) ~ Activate `open_instance` `open`;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `File`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;~ Activate `main_dlg_cur` `File.psh_open`;\
mapkey(continued) ~ Activate `file_open` `Inputname`;\
mapkey(continued) ~ Activate `open_instance` `instnamelist1`1 `the generic`;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `File`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;~ Activate `main_dlg_cur` `File.psh_open`;\
mapkey(continued) ~ Input `file_open` `Inputname` `to_be_deleted`;\
mapkey(continued) ~ Update `file_open` `Inputname` `to_be_deleted`;~ Activate `file_open` `Open`;\
mapkey(continued) ~ Activate `open_rep` `OK`;~ Select `main_dlg_cur` `MenuBar1`1 `File`;\
mapkey(continued) ~ Select `main_dlg_cur` `File.cb_file_erase`;\
mapkey(continued) ~ Close `main_dlg_cur` `File.cb_file_erase`;\
mapkey(continued) ~ Select `main_dlg_cur` `File.cb_file_erase`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Close `main_dlg_cur` `File.cb_file_erase`;\
mapkey(continued) ~ Activate `main_dlg_cur` `psh_erase`;~ Activate `0_std_confirm` `OK`;
After edit it works also from generic (if you type rg by mistake in a generic). Also no matter if the config.prooption "open_draw_simp_rep_by_default" is yes or no.
Works only if you can open two more windows than you already have.
Thanks for your inputs, everybody. People arequite happy with this mapkey.
It works in WF3 and also WF4. Just copy-paste into your config.pro.
Best Regards from Gunnar
Edited by: GunnarHansen