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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Rounding decimals to the nearest fraction

uogbsd
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
TomU
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

 

View solution in original post

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

Dual dimension with the dual units in fractions?

This is not possible at this time.

TomU
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

 

uogbsd
3-Visitor
(To:TomU)

Brilliant!

Thanks, that did it.

Top Tags