Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
Solved! Go to Solution.
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.
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?
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.
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.
Then you will have this dropdown menu:
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.
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
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 ¬e on the drawing it will show desired value
Thank you for the quick reply. Could you please tell me where I can find the relation, the relation tab?
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,