Change numerical text to real number in ProE
Change numerical text to real number in ProE
(OP)
We have a standard series of parts which use an alphanumeric string to identify them.
There are four characters within this string which are numeric, the first two denote the bore size in millimetres and the second two denote the length in millimetres.
We want to be able to pull apart the string that defines the part and have the program automatically size the part by reading the numeric text as numbers. (a reverse of itos really).
There are four characters within this string which are numeric, the first two denote the bore size in millimetres and the second two denote the length in millimetres.
We want to be able to pull apart the string that defines the part and have the program automatically size the part by reading the numeric text as numbers. (a reverse of itos really).





RE: Change numerical text to real number in ProE
I seen a post from Hora a little while back. Is this what you want to do?
http://www.eng-tips.com/viewthread.cfm?qid=52276
PS. I put this post in another question by mistake...
Tofflemire
RE: Change numerical text to real number in ProE
What I really need is something that turns a string stating "123" into the number one hundred and twenty three.
As I said before it would be the opposite of itos which turns integers into text, I want to turn numerical text into integers.
RE: Change numerical text to real number in ProE
get the string length
take each character and turn it into a numeric
multiple by the proper power to build the numeric value
123
decodes to 1 2 3 with a length of 3
1*100 + 2*10 + 3 = 123
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
RE: Change numerical text to real number in ProE
It looks like it's going to be a long-winded method whichever way it's done.
It's a shame they can produce itos but not the reverse.
Oh well back to the slate and chalk!
Oldbloke