×
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

trying to use expression formula in note text instead of value

trying to use expression formula in note text instead of value

trying to use expression formula in note text instead of value

(OP)
I am inserting a UDF and I have a way of selecting multiple fractions for example 1/4 . When the UDF is used, there is an expression that shows up and the formula for it reads 1/4, but the value reads .2500 . In my operation sheet I would like the note to read 1/4, but with <x0.4@expressionname> it reads .2500. Is there anyway I can get my operation sheet to read a fraction from the UDF data?

I am using nx 8

RE: trying to use expression formula in note text instead of value

What it sounds like you're asking for is the ability to have a numerical value created (and edited) as a fraction but where you get the results as TWO expressions, one a floating point number and the other a string showing the fraction as just that, a fraction.

While I haven't created an actual UDF, I have created a simple part file (attached below) which contains only expressions, but if you follow what I've done I think you can accomplish what you're looking for. The trick is that there's no way (without writing a custom program) to go directly from a floating point number to a fractional string, or vice versa. However, if you define TWO expressions, one for the 'denominator' and one for the 'numerator' of your 'fractional' variable, you can then take these two expressions and combine them so that you get both types of output expressions simultaneously. I'm not sure if this 'workaround' will be acceptable, but I can't think of anything at the moment (using only built-in functionality) which will give a floating point expression and a string expression which will always represent the same numerical value.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: trying to use expression formula in note text instead of value

(OP)
Thanks for your response. I might have to do this work around in another situaion, but I found out that I can make a dimension and change the settings to convert the number to a fraction to the nearest /64.

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