Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mixing TEXT and Real Numbers

Status
Not open for further replies.

3dlogix

Mechanical
Joined
Jan 31, 2002
Messages
435
Location
CA
Sometimes you need to pull a Real Number value and mix it with a Text value to create a string. Example, you have a Family table for pipe lengths.

With ProE Parameters, you can't mix real numbers with text, unless they are converted using itos (integer to string), and then it rounds up.

Here's a simple approach to this problem.
*******************************************************

You want to create a parameter that shows the length with annotation, such as "4.75 LONG" and put this in a drawing format.

Create a Parameter such as L=d1 (real number)
Create a Parameter such as L1=floor(L) (real number)
Create a Parameter such as L2=(L-L1)*1000 (real number)
Create a Parameter such as LENGTH=itos(L1) + "." + itos(L2) +"LONG"

Ex:

If d1=6.750
then L=6.750
L1=floor(6.750) = 6
L2=(6.750-6)*1000 = 750
LENGTH=itos(6) . itos(750) LONG = 6.750 LONG



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top