×
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

How to write <x.2@Height> without trailing zeros?

How to write <x.2@Height> without trailing zeros?

How to write <x.2@Height> without trailing zeros?

(OP)
How to write <x.2@Height> in a note without trailing zeros?
My value can be round number or decimal number, when it is round number I get two zeros after decimal mark, can it be done so if it is round number there is not trailing zeros?
Is there any guide for how to use text notes and PMI with expressions, attributes etc.???

_____________________________
Enjoy your work and have fun!

RE: How to write <x.2@Height> without trailing zeros?

hrm, x.2 means 2 decimals...


regards,
Tomas

RE: How to write <x.2@Height> without trailing zeros?

(OP)
Yes, but can that be written so if it is round number there is no zeros after? What to put instead of .2? x@Height gives rounded number with no decimals at all.

_____________________________
Enjoy your work and have fun!

RE: How to write <x.2@Height> without trailing zeros?

In the expression editor, create a string expression with the fomula:

CODE

format("%0.3g", Height, "units", "unitless") 

The "g" format specifier will ignore trailing zeros. You can reference this new expression in your note rather than referencing the "Height" expression directly.

www.nxjournaling.com

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