Skip to main content
1-Visitor
September 24, 2024
Question

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

  • September 24, 2024
  • 2 replies
  • 670 views

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
September 25, 2024

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

 

4-Participant
September 25, 2024

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