How to use “Mapkeys” to assign materials to different components for assembly in PTC Creo

Repetitively assigning materials to all parts is a time consuming process. So, in this Tech Tip, we will show you how to assign materials to all components in an assembly with the help of “Mapkeys”. This methodology of using “Mapkeys” saves your time approximately by 70% as the ‘mapkey takes care of the repetitive tasks’ which we perform while assigning materials to all components in an assembly.

We will use the ‘Motor Gear Box Assembly‘ to demonstrate “Mapkey functionality”. If you want to work on same “Motor Gear Box Assembly” you can download it by using ‘sign up’ or ‘free trial’ and getting an access to Tech Tips Section.

The video shows the process of creating material removal mapkey or follow below steps to know detailed use of “Mapkeys”.

The User Case

In the below figures the assembly ‘motor_gearbox_assembly.asm’ contains total 20 components. If we want to assign different materials to all these components by using regular material assignment process, then we will have to open each of the 20 components in a separate window and then by selecting ‘File –> Prepare –> Model Properties menu‘, we need to change the material assignment. We can reduce this repetitive task with the help of mapkey tool.

Using “Mapkey” for Gear Box Assembly
Figure 1: ‘motor_gearbox_assembly.asm’ consisting of total 20 components
Figure 2: The ‘PTC_MATERIAL_NAME’ parameter showing there is no material assigned to the components

Observe below steps to achieve the required result –

Step 1

Open the ‘Tree Columns’ menu

Step 2

Display the ‘PTC_MATERIAL_NAME’ parameter

Step 3

Select the first assembly component ‘base_plate.prt’ in the Model Tree

Step 4

Search and open the ‘Mapkeys’ command from the command finder

Note: Do not unselect the component before starting the mapkey recording.

Step 5

Click ‘New’ in the ‘Mapkeys’ dialog box

Step 6

Type ‘Record Mapkey’ dialog box and then click on ‘Record’ button

Note: Ensure that the component is not unselected.

Step 7

Right click the base_plate.prt in the Model Tree and select Open

Step 8

Select File –> Prepare –> Model Properties

Step 9

Select Change option in the Model Properties dialog box for materials

Step 10

Select ‘Pause for keyboard input’ option and then click the ‘Pause’ button

Step 11

Type in the prompt as shown and click OK

Step 12

Assign the required material

Note: Do not click OK in ‘Materials’ dialog box.

Step 13

Click Resume from the Record Mapkey dialog box and then click OK in the ‘Materials’ dialog box

Step 14

Close the Material Properties dialog box and close the base_plate.prt window.

Step 15

Click Stop in the Record Mapkey dialog box

Step 16

Click OK in the Record Mapkey dialog box

Step 17

The Mapkeys dialog box shows the created mapkey. Then click Close
The material shows applied for the base_plate.prt

Step 18

To run the Mapkey, select the next part cover.prt in the model tree and then press m and a keys on the keyboard one after other. Then the cover.prt opens and following dialog box comes

Dialog box pop up

Step 19

Double click the Legacy Materials folder and assign a different material to cover.prt Then click Resume.

Legacy Material Folder

Repeat the process of running the Mapkey for other components and assign them different materials.

For more tech tips and in-depth eLearning for PTC Creo, including new courses on other design solutions, please visit https://www.myigetit.com to explore more information or Just choose appropriate subscription plan to get started! If you should have any questions, please reach out to iproducts@tatatechnologies.com or igetitsocial@tatatechnologies.com for help.

Leave a Reply