Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

need code for fraction od inches

Anonymous
Not applicable
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? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!