Skip to main content
12-Amethyst
July 25, 2023
Solved

Windchill Atributes Type (String and Integer)

  • July 25, 2023
  • 1 reply
  • 2131 views

Is it possible to use an attribute connected to a CREO parameter in Windchill that reads both string and integer? If not, is there an easy way to convert the parameter type to string or integer inside the model in CREO?

 

 

 

Best answer by jbailey

That's what I figured, it would probably be easier to convert a string to integer on the Windchill side vs the relations required to first validate if the string even contains a number only... and then how to parse decimals if they exist etc.

 

1 reply

jbailey
18-Opal
July 25, 2023

So may be more of a Creo question... You can use a relation and itos

Create a prameter type integer integ

Create a relation integ_to_str = itos(integ)

New parameter value integ_to_str is a string with the string value from the integer param

I don't know if you can convert a string to an integer in Creo

 

23-Emerald III
July 26, 2023

The only way to convert a string to an integer is a complex series of relations. It is a bit more complex than converting a floating number to a string.

jbailey
jbailey18-OpalAnswer
18-Opal
July 26, 2023

That's what I figured, it would probably be easier to convert a string to integer on the Windchill side vs the relations required to first validate if the string even contains a number only... and then how to parse decimals if they exist etc.