Showing results for 
Search instead for 
Do you mean 

Integer to String

by Technical Evangelist on ‎09-29-2015 01:52 PM - edited on ‎02-24-2020 03:12 AM by Community Manager (944 Views)

Description: This models takes a number in integer format and, by use of a temp file, outputs it in string format.
Download

 

integer_to_string.png

Comments
by
on ‎04-19-2020 11:39 PM

It looks like the operators here have been modified a bit in later versions so this technique doesn't work any longer. Here's a way I got around the problem:

string.png

Here I had a string that I wanted to add 1 to and then convert back to string. From String works fine, but then the output from To String is Float (50). The Regex I used to get the value in parenthesis was (?<=\()(.*?)(?=\))

Hope this helps. YMMV.

by Technical Evangelist
‎04-21-2020 07:01 AM - edited ‎04-21-2020 07:01 AM

Hi @JohnnieJ ,

 

The Legacy operators like Add output a IMAGINE.Scalar, rather than the IMAGINE.Double you input. You can Convert that IMAGINE.Scalar back to IMAGINE.Double. So this should also work:

 

convert.PNG

 

In fact you may not need the final To String - depends what you are doing with the number downstream.

 

Cheers

 

 

by
on ‎04-23-2020 03:17 AM

Yup, that's much easier!

Courses