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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Parameter setting -a drop-down list in the material column with the specified materials

ssreevalsan
8-Gravel

Parameter setting -a drop-down list in the material column with the specified materials

We are currently entering material and remarks information in columns. We would like to have a drop-down list in the material column with the specified materials, allowing us to select from the list. In the remark's column, the corresponding coating or treatment for the selected material will automatically appear

parameter setting.png

ACCEPTED SOLUTION

Accepted Solutions

10 REPLIES 10
tbraxton
22-Sapphire I
(To:ssreevalsan)

Custom programming using an API would be required to implement this using the GUI.

 

Without API programming, you could use conditional relations to update the coating/treatment string based on the value of the material parameter assuming there is a unique coating/treatment value mapped to each material selection.

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Thank you very much for your reply. As I am new to this, I would greatly appreciate it if you could provide further explanation on how I can proceed. If it is not too much trouble, could you please share a PowerPoint presentation or a video on this topic?

BenLoosli
23-Emerald II
(To:ssreevalsan)

I would recommend that you look at the use of material files and their parameters for setting material parameters in the part files. You can extract material descriptions from the material files.

If you just want a drop-down list of items to select from for a parameter, look into using restricted_parameter file for the selection list.

Hidetaka
15-Moonstone
(To:ssreevalsan)

An easy way to do so is to use External File for Restricted Parameters (.lst)
A lst file looks like this. I wrote it for a parameter named Maker, but writing for "Material" would be the same.
Note that if you do so, Material is just a string parameter.

Hidetaka_0-1721805663309.png


Then you will have this dropdown menu:

Hidetaka_1-1721805714752.png

 

To pair values in one column with values in another column, use relation:

For example: 

if material == "S45C" 
treatment = "Ni-Cr/5"
endif

To add relations automatically, use modelCheck (add missing relations).
To add the relations in the example above to your model, in the appropriate .mcs file, add this

PRT_RELATION if material == "S45C" 
PRT_RELATION treatment = "Ni-Cr/5"
PRT_RELATION endif


It is just that simple.

 

Create new parameter with dropdown menu in "definition tab" and a simple relations which are automatically getting the correct value.

Radovan_DT_0-1721887114246.png

Radovan_DT_1-1721887122784.png

Radovan_DT_2-1721887165276.png

 

 

Thank you for guiding me. I am now able to create the drop-down list for the material. Could you please explain how to establish a relation for the remark column?

So these are my values

Radovan_DT_0-1721892501317.png

and this is how relations are made

if material == "OTHER"
note = "manual input"
endif
if material == "AlMg"
note = "anodizing"
endif
if material == "EN31"
note = "nickel plating, 40-45 HRC"
endif
if material == "MS"
note = "nickel plating(dull)"
endif

So when i put &note on the drawing it will show desired value

Radovan_DT_1-1721892604817.png

Radovan_DT_2-1721892612054.png

 

Thank you for the quick reply. Could you please tell me where I can find the relation, the relation tab?

Radovan_DT_0-1721893316521.png

 

Thank you for your quick support.

I made the modifications, and it is working now.

If I change the material, I need to click the highlighted tab below for the remarks to update.

 

is there any way to update automatically,

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags