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

Material ID

ChiselnMallet1
12-Amethyst

Material ID

Hello,

 

I am having trouble finding the material ID for use in a note.  I have created a new parameter in my material called "SPEC" that I'd like to use in my note.  But I cannot find where to get the MTRL_ID

 

Thanks for any assistance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi, Here is the way I do it.

If your user defined parameter in material is called SPEC then to reuse that as a note the I pull the material parameter into a model parameter. It might work by just doing &material_param("SPEC") but I would create the relation to make SPECIFICATION=material_param("SPEC") then the note is &SPECIFICATION. As it happens I also have IF else statements to show the note as unassigned if the material has not been assigned to the part.

View solution in original post

8 REPLIES 8

Is your material ID in the parameter list?  If it is copy the exact name of the parameter.  In your annotation type "&" then the parameter name. (e.g. &MTRL_ID).


There is always more to learn in Creo.

Hi, Here is the way I do it.

If your user defined parameter in material is called SPEC then to reuse that as a note the I pull the material parameter into a model parameter. It might work by just doing &material_param("SPEC") but I would create the relation to make SPECIFICATION=material_param("SPEC") then the note is &SPECIFICATION. As it happens I also have IF else statements to show the note as unassigned if the material has not been assigned to the part.

BenLoosli
23-Emerald I
(To:Roy_Crerar)

Segment from one of my material files:

{
Name = PDM_NAME
Type = String
Default = 'A36 STEEL'
Access = Full
},
{
Name = DESCRIPTION1_U
Type = String
Default = 'UNS K02599, STEEL'
Access = Full
},
{
Name = DESCRIPTION2_U
Type = String
Default = 'A36 STEEL'
Access = Full
},
{
Name = DESCRIPTION3_U
Type = String
Default = 'A36 ST'
Access = Full
},

 

Segment from my Relations:

/*** SET MATERIAL PROPERTIES ***
IF PTC_MATERIAL_NAME=="UNASSIGNED"
MATERIAL="UNASSIGNED"
MATERIAL_DESC1="NO MATERIAL ASSIGNED"
MATERIAL_DESC2=""
MATERIAL_DESC3=""
ELSE
MATERIAL=material_param("PDM_NAME")
MATERIAL_DESC1=material_param("DESCRIPTION1_U")
MATERIAL_DESC2=material_param("DESCRIPTION2_U")
MATERIAL_DESC3=material_param("DESCRIPTION3_U")
ENDIF

 

Once a material is set, the relations pull the parameter information in.

 

In the model file, we have a saved annotation (material_std_note):

&MATERIAL_DESC1
&MATERIAL_DESC2
&MATERIAL_DESC3

 

This gets pulled into the drawing.

Why are there 3 different material descriptions?

This is a bad example because A36 is a common material. We use some materials that need the 3 lines for their descriptions to get fully defined. If a description line is blank, it will be blank on the drawing.

Is it possible to put a parameter table in the .mtl?  I notice the syntax the beginning of the file is different from the restricted value parameter files.

 

ND_RelParSet_K01 = { ***from .mtl first line

 

ND_ParamDefArr_K01 = { ***from restricted value file first line

and the parameter table line is

ND_ParamTable_K01 = {

 

Wondering if a table in the .mtl file needs to be something like "ND_RelParTable_K01"?

 

 

 

 

 

I was having trouble defining the material's ID in the part file itself.  But eventually found that I didn't need the ID to call it.  That the &material_param("xxxx") method called the active material.

 

Thanks you for your reply!

Material ID could be found by adding a material parameter to relationships.

Creo will prompt a list with all available material

select material by name

Creo replaces it with internal ID

Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics: Real-time Collaboration