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

Mapkey Writing/Editing Tips

Re: Mapkey Writing/Editing Tips

Comment lines start with ! and do not have to be at the beginning or the end of the file.

happy commenting.

! I am a comment line

Also, I have blank lines in my current config.pro file. One time when I was troubleshooting a problem Creo support told me to remove the blank lines but that was just a bug in that release. Since then I think it has been fixed again.

Re: Mapkey Writing/Editing Tips

When my mapkey window dissapears behind the other Creo windows, I simply minimizes and maximizes creo in Windows, by clicking on the windows toolbar twice 🙂

regards Torkil 

Re: Mapkey Writing/Editing Tips

Here's a way of writing a helpful text message to the end-user by displaying

multiple lines of text in the PAUSE dialog box, by using the newline code \n :

 

mapkey xx @MAPKEY_NAMEDemo of multi-line pause;\
mapkey(continued) @MAPKEY_LABELDemo;\
@MANUAL_PAUSEInstructions for end-user:\n\n\
Use the newline character " \\n "\n\
to add lines to your text displayed in\n\
the PAUSE dialog box\n\n\
Like you see in this example.;

Results in:

multi-line-pause-dialog.png

Re: Mapkey Writing/Editing Tips

 
Highlighted

Re: Mapkey Writing/Editing Tips

Looks like the original mapkey discussion around creating/opening a drawing with the same name disappeared at some point. Here are mapkeys for Creo 4 M040 to open drawing with same name (ODRW) and create new drawing with same name (NDRW). ODRW should work with Windchill. You will need to include the mapkeys between the !============ for ODRW and NDRW to work. As usual with mapkeys, you will have to test/validate with your specific build of Creo.

 

mapkey odrw @MAPKEY_NAMEOpen drawing with same name as active model or selected assembly part;\
mapkey(continued) @MAPKEY_LABELOpen Drawing w/ Same Name (odrw);\
mapkey(continued) ~ Command `ProCmdOpenModel@PopupMenuGraphicWinStack`;\
mapkey(continued) ~ Activate `open_instance` `open`;\
mapkey(continued) %>storetmpfile;%>partnameopen;%>loadconf;\
mapkey(continued) ~ Command `ProCmdModelOpen`;\
mapkey(continued) ~ Activate `file_open` `workspace_pb`;\
mapkey(continued) %partnameopen;\
mapkey(continued) ~ Activate `file_open` `Inputname`;

mapkey ndrw @MAPKEY_LABELNew Drawing w/ Same Name (ndrw);\
mapkey(continued) %>storetmpfile;%>partnamenew;%>loadconf;\
mapkey(continued) ~ Command `ProCmdModelNew`;\
mapkey(continued) ~ Select `new` `Type` 1 `Drawing`;\
mapkey(continued) ~ Activate `new` `chk_use_default_template`0 ;\
mapkey(continued) %partnamenew;\
mapkey(continued) @MANUAL_PAUSEName drawing and Resume.;\
mapkey(continued) ~ Activate `new` `OK`;\
mapkey(continued) ~ Select `dwg_create` `rad_format` 1 `1`;

!======================
mapkey >storetmpfile @MAPKEY_LABELStore model name to temp file;\
mapkey(continued) ~ Command `ProCmdModelSaveAs` ;\
mapkey(continued) #CURRENT VALS;\
mapkey(continued) ~ Activate `storage_conflicts` `Close_PushButton`;\
mapkey(continued) ~ Select `file_saveas` `type_option` 1 `db_129`;\
mapkey(continued) ~ Activate `file_saveas` `check_is_secondary` 0;\
mapkey(continued) ~ Activate `file_saveas` `Current Dir`;\
mapkey(continued) ~ Activate `file_saveas` `OK`;\
mapkey(continued) ~ Activate `UI Message Dialog` `ok`;

mapkey >partnameopen @MAPKEY_LABELGets partname to open drawing;\
mapkey(continued) @SYSTEMdel sw.pro\n\
mapkey(continued) dir /b *.pic>\%temp\%\\filename.txt\n\
mapkey(continued) set /p VAR1=<\%temp\%\\filename.txt\n\
mapkey(continued) del \%temp\%\\filename.txt\n\
mapkey(continued) set FILENAME=\%VAR1:\~0,-4\%\n\
mapkey(continued) echo mapkey partnameopen \~ Update `file_open` \
mapkey(continued) `Inputname` `\%FILENAME\%.drw`\;>>sw.pro\n\
mapkey(continued) del *.pic;
mapkey >partnamenew @MAPKEY_LABELGets partname for new part;\
mapkey(continued) @SYSTEMdel sw.pro\n\
mapkey(continued) dir /b *.pic>\%temp\%\\filename.txt\n\
mapkey(continued) set /p VAR1=<\%temp\%\\filename.txt\n\
mapkey(continued) del \%temp\%\\filename.txt\n\
mapkey(continued) set FILENAME=\%VAR1:\~0,-4\%\n\
mapkey(continued) echo mapkey partnamenew \~ Input `new` \
mapkey(continued) `InputPanel1` `\%FILENAME\%`\;>>sw.pro\n\
mapkey(continued) del *.pic;

mapkey >loadconf @MAPKEY_LABELLoad mapkey into session;\
mapkey(continued) ~ Command `ProCmdRibbonOptionsDlg`;\
mapkey(continued) ~ Select `ribbon_options_dialog` `PageSwitcherPageList` 1 `ConfigLayout`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `ConfigLayout.Open`;\
mapkey(continued) ~ Activate `file_open` `Current Dir`;\
mapkey(continued) ~ Update `file_open` `Inputname` `sw.pro`;\
mapkey(continued) ~ Command `ProFileSelPushOpen@context_dlg_open_cmd`;\
mapkey(continued) ~ Activate `ribbon_options_dialog` `OkPshBtn`;\
mapkey(continued) ~ Activate `UITools Msg Dialog Future` `no`;\
mapkey(continued) @SYSTEMDel sw.pro;
!======================

Re: Mapkey Writing/Editing Tips

Thank you very much for this solution! It's works also with Creo3.

Re: Mapkey Writing/Editing Tips

 

  1. Use Notepad++ for extra capability
  2. Add a custom language to Notepad++ with Mapkey syntax for color coding...HUGE HELP!https://community.ptc.com/t5/System-Administration/Notepad-User-Defined-Language-files-for-Creo-Para... 
Announcements