Skip to main content
1-Visitor
Sep 24, 2024 5:01 PM UTC
Question

Is there a method to retrieve a string parameter value from the assigned material?

it seems that the function material_param() applies only for numerical parameters. You cannot access string parameters from the material with this function. Is there a method to retrieve a string parameter value from the assigned material?

2 replies

24-Ruby III
Sep 25, 2024 6:20 AM UTC

Hi,

in Creo 10.0 I added Cast_iron_gray.mtl to test part.

Following relations work well.

x_PTC_POISSON_RATIO=material_param("PTC_POISSON_RATIO")
x_GRANTA_DATABASE_KEY=material_param("GRANTA_DATABASE_KEY")

MartinHanak_0-1727245237775.png

 

Translate
4-Participant
Sep 25, 2024 7:51 AM UTC

Hello RM_5465201,

Not sure if I got your question.

Notes and relationships do not make a difference for parameter type (at least, if types are not mixed). They work for all types of parameters. For sure it is not possible to treat strings as double or other way around. Creo always has issues with type conversion.

upload_-aW1hZ2UwMDEucG5n-7424487123033555079..png

upload_-aW1hZ2UwMDQucG5n-6689052116152460243..png

upload_-aW1hZ2UwMDUucG5n-4019697388715457755..png

Translate