×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Change numerical text to real number in ProE

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).

RE: Change numerical text to real number in ProE

Hi Oldbloke,

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

(OP)
Thanks for your comment, I hadn't seen this before but we already use a function like the one shown.

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

I think you will have to decode the string and do the conversion manually.

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

(OP)
Thanks for your comment, it shortens the method I was thinking about.

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources