cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

need code for fraction od inches

I have this code in one of my objects but I need to have it show 1/4" or 1/2" or whatever it is but my code just shows whole inches like 36" and not 36 1/2". Here's my existing code:

TEXT2 0, 0, STR("%fi", GLOB_ELEVATION)

WHat do I need to do to get it to show the exact glob_elevation?

Thanks and Happy Thanksgiving,
Michele
2 Replies 2
Anonymous
Not applicable
You haven't specified a precision level in your format string, so it defaults to whole inches.

It should be:

TEXT2 0, 0, STR("%0.8fi", GLOB_ELEVATION)

This will give precision to eighths on an inch. For halves the value is "0.2", for sixteenths it is "0.16", etc. It's a little quirky but it makes sense.
Anonymous
Not applicable
Thanks for the code! I'll have to try it out - right now I'm busy trying to get something out.

Thanks again,
Michele

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!