Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Map Keys To Open Drawing With Same Name As Model

Hey everyone,

I have searched through some discussions but I don't really understand the code that has been thrown around. I have three map keys set up in my config file. The first is ft and that opens my family table. The second is od and that opens my drawing and gives me a front cross section view, a right view, and then an iso view in the top right corner, I then pause to pick my instance and fill is my prompts such as details, date, drawn, by, part number, etc. I then use d to open the dimension tool and dimension the drawing. My question is how to I get my drawing file to open and be saved as the same name as the model file through my map keys so I don't have to go in and rename every drawing that I do? I tried to follow some peoples codes and put them in my map key code but then everything messed up. I also would like to get my drawing number box in the title block to be the same name as what the drawing and model are named. I'll attach a copy of the map key code I am running at the moment. Any help would be greatly appreciated because I'm pretty lost right now. Thanks!


mapkey od @MAPKEY_LABELopen drawing;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;~ Activate `open_instance` `open`;;;;;;;;;;;\
mapkey(continued) ;~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) @PAUSE_FOR_SCREEN_PICK;~ Activate `GET SELECT` `done_sel`;\
mapkey(continued) ~ Activate `showerase` `psh_accept_all`;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) @PAUSE_FOR_SCREEN_PICK;@PAUSE_FOR_SCREEN_PICK;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) @PAUSE_FOR_SCREEN_PICK;@PAUSE_FOR_SCREEN_PICK;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) ~ Activate `showerase` `psh_close`;\
mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `popupMenuRMBTimerCB`;\
mapkey(continued) ~ Close `rmb_popup` `PopupMenu`;~ Activate `rmb_popup` `DwgPopupErase`;
mapkey ft @MAPKEY_LABELFamily Table;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_famtab`;
mapkey od @MAPKEY_LABELopen drawing;\
mapkey(continued) ~ Select `main_dlg_cur` `MenuBar1`1 `Utilities`;\
mapkey(continued) ~ Close `main_dlg_cur` `MenuBar1`;\
mapkey(continued) ~ Activate `main_dlg_cur` `Utilities.psh_famtab`;@MANUAL_PAUSEgo;\
mapkey(continued) ~ Activate `ftb_edit_table` `OK`;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;~ Activate `open_instance` `open`;;;;;;;;;;;\
mapkey(continued) ;~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;
mapkey od @MAPKEY_LABELopen drawing;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;~ Activate `open_instance` `open`;;;;;;;;;;;\
mapkey(continued) ;~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;
mapkey d @MAPKEY_LABELdimension;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) @PAUSE_FOR_SCREEN_PICK;~ Activate `GET SELECT` `done_sel`;\
mapkey(continued) @PAUSE_FOR_SCREEN_PICK;@PAUSE_FOR_SCREEN_PICK;\
mapkey(continued) ~ Activate `showerase` `psh_close`;
mapkey od @MAPKEY_LABELOpen Drawing;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;~ Activate `open_instance` `open`;;;;;;;;;;;\
mapkey(continued) ;~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdDwgLockViewMovement.dwg`0;
mapkey od @MAPKEY_LABELOpen Drawing;\
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;~ Activate `open_instance` `open`;;;;;;;;;;;\
mapkey(continued) ;~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;@PAUSE_FOR_SCREEN_PICK;
mapkey od @MAPKEY_LABELOpen Drawing;\
mapkey(continued) ~ Move `main_dlg_cur` `main_dlg_cur`2 0.596849 1.141798
mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdModelNew.file`;\
mapkey(continued) ~ Select `new` `Type`1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format`1 `1`;\
mapkey(continued) ~ Select `dwg_create` `lst_template_names`1 `fam_table_4`;\
mapkey(continued) ~ Activate `dwg_create` `psh_ok`;
mapkey d ~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;\
mapkey(continued) ~ Activate `showerase` `chk_dim`0 ;~ Activate `showerase` `chk_dim`1
mapkey(continued) ~ Move `GET SELECT` `GET SELECT`2 44.737720 12.871177;




mapkey d ~ Activate `main_dlg_cur` `ProCmdDwgShowErase.dwg`;\
mapkey(continued) ~ Activate `showerase` `chk_dim`0 ;~ Activate `showerase` `chk_dim`1
mapkey(continued) ~ Move `GET SELECT` `GET SELECT`2 44.737720 12.871177;
 
"I also would like to get my drawing number box in the title block to be the same name as what the drawing and model are named."

use &dwg_name or &model_name depending on which one you want to have control over the name for that box.
 

Sponsor

Articles From 3DCAD World

Back
Top