Keyboard macros, or "mapkeys", may be created to execute a sequence of frequently used commands. These mapkeys may be mapped to a keyboard key (or keys) which are used either in the current session or saved in your configuration file (usually the config.pro file) for use in future sessions.
In Pro/ENGINEER Wildfire 4.0, these macros may be created using the Mapkey functionality in the Tools menu. Button icons may also be created with mapkeys for easy selection and display in toolbars.
Click Tools > Mapkeys. This opens the MAPKEYS dialog box.
Click New to open the RECORD MAPKEY dialog box and create a new mapkey.
Enter the key (or keys) for executing the macro in the KEY SEQUENCE input panel. When assigning a mapkey to a function key use the following format: $function key. For example:
The F3 function key would be entered as "$F3".
Enter a name in the NAME input panel if an icon for the mapkey is to be displayed in a toolbar.
Enter into the DESCRIPTION input panel the help text to be displayed for a mapkey icon placed in a toolbar.


Click Record and perform the actions that are to be included in the mapkey. Click Stop when finished defining the mapkey, and click OK to return to the MAPKEY dialog box.
Click Changed from the MAPKEY dialog box to save newly created mapkeys or All to save all mapkeys to a configuration file. Answer the prompt:
Enter configuration file name: config.pro [RETURN]
Mapkeys will be available for use in the current session only unless saved in a configuration file using Changed or All.
Click Close when finished defining mapkeys.
To add the mapkey icon to a toolbar, click Tools > Customize Screen.... The CUSTOMIZE dialog box will appear as shown below.

Select Mapkeys from the Categories box.
Click the mapkey and drag the mapkey icon into the toolbar. The default icon for the mapkey can be changed by selecting the icon from the list of mapkeys, holding down the right-mouse button, and clicking Edit Button Image.... The BUTTON EDITOR dialog box will appear. Select a color, then click on a pixel to change it to the desired color. The arrows may be used to shift the image within the icon.
Click OK when finished, the OK from the CUSTOMIZE dialog box.

Example 1: Creating a mapkey that turns off the display of datum planes in a model.
1. Click Tools > Mapkeys.
2. Click New and enter "$F3" in the KEY SEQUENCE input panel.
3. Enter "Off" in the NAME input panel and "This mapkey will turn off the display of datum planes" in the DESCRIPTION input panel.
4. Click Record, then Tools > Environment, clear the Datum Planes checkbox > OK.
5. Click Stop > OK from the RECORD MAPKEY dialog box.
6. Click Changed and enter a carriage return in the message window to save the mapkey to the default configuration file.
7. Click Close from the MAPKEY dialog box.
Result: Selecting the [F3] key at any time will execute a macro to turn off the environment display of datum planes in a model.
Example 2:Creating a mapkey that creates a new part containing default parameters.
1. Click Tools > Mapkeys.
2. Click New and enter "prt" in the KEY SEQUENCE input panel.
3. Enter "PRT" in the NAME input panel and "This mapkey will create a new part with default parameters" in the DESCRIPTION input panel.
4. Click Pause for keyboard input to allow for a pause when entering the name of a new part, then Record.
5. Click File > New and Pause from the RECORD MAPKEY dialog box.
6. Type "Resume" into the RESUME PROMPT dialog box and OK.
7. Click OK from the NEW dialog box.
8. Click Resume from the RECORD MAPKEY dialog box.
8. Click Tools > Parameters, enter the parameter name, select the parameter type, enter the parameter value and click OK.
9. Click Stop and OK from the RECORD MAPKEY dialog box.
10. Click Changed and enter a carriage return in the message window to save the mapkey to the default configuration file.
11. Click Close from the MAPKEY dialog box
Result: Selecting the [prt] keys at any time will create a new part that contains the predefined default parameter(s).
In the previous example, one of the commands in the "PRT" mapkey asks for an input that must be entered from the keyboard (e.g. the name of a part). The macro will pause allowing for keyboard input and then continue execution when Resume is selected.
Related Information:
-
New Pro/ENGINEER Training Exercise Demo!
Test drive a
FREE three-part sample learning exercise featuring the Pro/ENGINEER Auto Round training module. Discover how this powerful Auto Round tool can enhance your design capabilities faster and more efficiently… then apply your newfound knowledge to live projects you’re currently working on.
This free example learning exercise includes:
- An audio and slide presentation that introduces and outlines the Pro/ENGINEER Auto Round module
- A video demonstration and narration of the application in use
- Step-by-step audio instructions on how to utilize the Auto Rounds module to enhance your design process.
Of course, this is just one example of the thousands of topics that PTC University covers in its courses. You can attend classes at one of our training centers, learn on-line or request onsite training right at your place of business. Click here to find out more about PTC University.
Was this tip helpful? Let us know.