cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

3-Visitor

## Rounding decimals to the nearest fraction

My company has a drafting standard that requires the dimension displays to be in decimal format. The parts are relationally driven. On occasion there is a part that we need to outsource, and the vendor requires shaft lengths to the nearest 1/16".

So is there a to keep the decimal display, but way to round the nearest .0625"?

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald IV
(To:uogbsd)

Add a relation statement like this for any value that needs to be on a certain increment.

``````/* Round to nearest 1/16
IF MY_DIM != ((FLOOR((MY_DIM * 16) + 0.5)) / 16)
MY_DIM = ((FLOOR((MY_DIM * 16) + 0.5)) / 16)
ENDIF``````

4 REPLIES 4
23-Emerald II
(To:uogbsd)

Dual dimension with the dual units in fractions?

10-Marble
(To:BenLoosli)

This is not possible at this time.

23-Emerald IV
(To:uogbsd)

Add a relation statement like this for any value that needs to be on a certain increment.

``````/* Round to nearest 1/16
IF MY_DIM != ((FLOOR((MY_DIM * 16) + 0.5)) / 16)
MY_DIM = ((FLOOR((MY_DIM * 16) + 0.5)) / 16)
ENDIF``````

3-Visitor
(To:TomU)

Brilliant!

Thanks, that did it.

Top Tags