Skip to main content
Mar 30, 2020 10:26 PM UTC
Solved

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"?

TomUAnswer
Mar 31, 2020 2:10 PM UTC

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

Mar 30, 2020 11:37 PM UTC

Dual dimension with the dual units in fractions?

Apr 15, 2020 8:36 AM UTC

This is not possible at this time.

TomUAnswer
Mar 31, 2020 2:10 PM UTC

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

 

uogbsdAuthor
Mar 31, 2020 3:57 PM UTC

Brilliant!

Thanks, that did it.