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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

ASSIGN PTC MATERIAL TO .PRT TEMPLATE

emccann
1-Newbie

ASSIGN PTC MATERIAL TO .PRT TEMPLATE

Hi all,

I would like to be able to select / assign a material when I start a new part without having to go through file>properties>materials....

In short, I want to modify the models properties without having to go through the menus.

I tried adding a string parameter, but it did not work. So I must not be doing something right.

Thanks


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions
SylvainA.
4-Participant
(To:emccann)

Hello!

The easiest way would be to add both materials to your template and set the parameter PTC_MATERIAL_NAME to the desired value.

mats+in+model.JPG

mat+choice.jpg

But it should be easier to create two templates, one for steel parts and another for aluminium parts. Isn't it ?

View solution in original post

5 REPLIES 5
creodential
5-Regular Member
(To:emccann)

Hi Eileen,

I think you are mixing up the string parameter for the material in a part (or your template) with the actual material properties, means: the assigned .mat file. They are not necessarily linked, unless you use a relation to write the properties of your mat file into your string parameter.

I'd recommend a mapkey that jumps directly to the material section of the part properties and preselect your pro_material_dir. Couldn't live without it.

HTH

Andreas

Hi Andreas,

I was trying to apply a .mat file to the template and make it a choice between steel and aluminum. I though i could do it with a string parameter.
I just don't know how to write the relation part.

In the mean time I can always try the map key thing.

Thanks a lot

SylvainA.
4-Participant
(To:emccann)

Hello!

The easiest way would be to add both materials to your template and set the parameter PTC_MATERIAL_NAME to the desired value.

mats+in+model.JPG

mat+choice.jpg

But it should be easier to create two templates, one for steel parts and another for aluminium parts. Isn't it ?

creodential
5-Regular Member
(To:SylvainA.)

Hi,

that's cool, this solution actually works. I had doubts if switching the material via the drop box would change the density but it does.

I haven't had a look at this parameter until now, 'cause we don't use it. We have a material parameter of our own because the file name of the mat file is not enough on a drawing. But I think I'll have a closer look what else I'v been missing there so far.

@Eileen: The relation you would need is something like

%mat%=material_param("BEND_TABLE") where %mat% stands for your material parameter, but the solution above is way smarter.

Hi Sylvain,

that is exactly what i wanted to do.

Thanks a lot for that solution.

And you are right, it would be easier to have two seperate templates, but i prefer to have only one and change the material easily in case the user did not choose the right template to start with.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags