Quantcast
Channel: PTC Community: Message List - Creo
Viewing all articles
Browse latest Browse all 11377

Re: Extract numbers from string in creo

$
0
0

Hello,

 

So then, length of the string remains as an issue. One of two issues actually. You can use string_length relation function to find out how long is the string.

 

If the length of the part name varies too much, and you can't tell what could be the possible maximum length of the string in characters, then I can't really think of any solution. But if you can set the cap number that matches your longest string length then you might be able to get the numbers after it goes through all relations. While adding dummy numbers or characters to each of your strings so they always match the preset length.

 

Imagine you will for example have to test 48 characters in total, and you will be testing them all in such a way that Antonius has suggested above. Some will and some won't be numbers, now how to go around with the concatenation of the numbers into a new string? That's the question.

 

I'll stop trying to pull you into the problem right here, cause it might be too huge. Converting a string number into a real number is another one, but it might just be a piece of cake compared to the first one.


Viewing all articles
Browse latest Browse all 11377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>