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

mapkey trouble in Creo 2.0

Re: mapkey trouble in Creo 2.0


Step by step tutorial:

1 - Put the following lines in the end of your and save:

mapkey )) @MAPKEY_LABELReference_Dim;\

mapkey(continued) @SYSTEMStart c:\\creo-macros\\)).exe;\

mapkey(continued) ~ Command `ProCmdEditProperties`;

mapkey *2 @MAPKEY_LABEL2X;\

mapkey(continued) @SYSTEMStart c:\\creo-macros\\x2.exe;\

mapkey(continued) ~ Command `ProCmdEditProperties`;

2 - Download attached zip file.

3 - Extract files from zip to a new folder c:\creo-macros

4 - (Re)Start Creo and run the mapkeys.

Good luck.


Re: mapkey trouble in Creo 2.0

Jose, thanks for the contribution.

The thing works very well on linear dimensions, even in reversed order - first *2 and then )) gives the correct (dim)(x2) instead of previously in WF2 (dim(x2)).

However it doesn't work on radii and diameters, and neither on ordinate dims.

Also, is there a way I can see the code behind these exe's? I tried to open it with AutoIT, but that didn't work. I'd like to know what it looks like inside, so I can make more of these (next to *2 there used to be a *3, *4 , *m, *d, *h, etc...).

Re: mapkey trouble in Creo 2.0

Hi Robbie,

the code is what I gave you before:

WinWaitActive ("Dimension Properties"); Waits for the window of Dimension Properties to be active

Send("{RIGHT}^{TAB 6}{END}"); Sends a sequence of Keystrokes

Send("("); sends text for preffix


Send(")"); sends text for suffix

Send("{TAB 10}{Enter}"); Sends a sequence of Keystrokes

this one for )).exe

The other I don´t have here right now. I have to take a look later.

Re: mapkey trouble in Creo 2.0

Ok Robbie,

I see where the problem is. I used only simulated keystrokes to do this and this can´t be done this way because on other types of dimensions, some fields are disabled, so the number of keystrokes to reach a button is different.

I changed the code a little bit to focus directly the prefix and suffix fields. Try this new files.

I think i´m not being very clear but if you take a look at the code files you will see what I mean.

Keeping the code files is a nice way to build more macros by yourself .



Re: mapkey trouble in Creo 2.0

Hello Jose,

relating to this topic I would have some questions to ask you for a help concerning the call to external script files from inside a mapkey.

I need to record a mapkey which opens the "file open" window and then places the curson in the dynamic filter bar ("search..."):


and I usually do this last operation by pressing 3 times TAB key.

Well, given that by simply recording the mapkey doesn't recognize the press of the tab key, nor the click with the mouse, I am thinking about editing an autohotkey script which does the 3 times TAB key press, to then recall it from the mapkey itself.

- In your comment line "mapkey(continued) @SYSTEMStart c:\\creo-macros\\)).exe;\", what does it mean "@SYSTEMstart"? could I omiss it in my case? (I work with embedded Windchill so I don't use working directory command).

- should the script file be .exe or can it be also .ahk?

Also, as an alternative of editing the, I read about the OS Script tap in mapkey definition window but didn't understand whether in this tab should I put directly the path to the .exe (or .ahk) file, or instead the whole code of the mapkey.

(If you have other suggestions they are welcome by the way).

many thanks



Re: mapkey trouble in Creo 2.0


I recommend making a new thread for this question. Or put a link here if you already have one.

To answer the part of your question related to this thread, OS Script is closely related to batch scripting. That basically means if you can run a file via the Windows command line you can run it using OS Script.

Creo Tutorial: How to open external file with Mapkey - YouTube


Re: mapkey trouble in Creo 2.0

Hi James,

yes in fact I had already opened a thread on my specific inquiry:

that has just been solved today with a mapkey without external file opening. (yesterday, I had tried and finally solved it also with a mapkey with an external link to a script, hence the reason of my reply here).

In the tread you'll find both the script and the mapkey codes, if you may be interested in.

Thank you for the tip, indeed I was thinking the os script option could open just specific command line file (VB script), instead any file may be open indeed.

This possibility is very powerful...plenty of thing that can be automated.