How i can round a dimension on the custom unit in drafting? for example I have a dimension "460.12". I want round it on 50 unit precision that show me "450".

How i can round a dimension on the custom unit in drafting? for example I have a dimension "460.12". I want round it on 50 unit precision that show me "450".

Hello again,

I'm not in front of SolidWorks to test this, but another approach may be to use the fraction option for the dimension.

- On the dimension's Property Manager, Value tab (I think, it's one of the tabs), change Decimal to Fractions
- On the same tab, for the fraction unit value, enter 0.02
- The value entered is the recipricol of the desired fraction, so for 1/16, you'd enter 16

For 50, you enter 0.02 (aka 1/50)

- The value entered is the recipricol of the desired fraction, so for 1/16, you'd enter 16

Caveats:

- Solidworks permits fractions for units other than inches (or feet/inches)
- Solidworks permits fraction unit values less than one into the input box.
- This feature is designed for fractions and the recipricol of any number less than one isn't a fraction

- Solidworks uses the entire dimension value to compute the fractional value and not just the remainder after the decimal point
- I don't know the code, but using the entire dimension value is a simple algorithm to get the fractional value for displaying:

Fractional Value = (INT(Decimal Value * Fraction Unit)) / Fraction Unit

- I don't know the code, but using the entire dimension value is a simple algorithm to get the fractional value for displaying:
- I believe SolidWorks fraction display only rounds down
- With your large 50 rounding (and only rounding down), percent error from actual can be large (~10% for 499.99 as 450) and the error grows rapidly for smaller actual values
- For actual values under 50, zero is returned and your part and drawing aren't proper.

You can also set the fraction precision for the whole document in Document options>Units.

But as for the individual dimension, this approach may not work for your purpose as the caveats above still apply.

Cheers,

Kevin

Curently you can ot round the dimension. I'm having the same problem. That is why I created the idea for the Top Ten List Dimension round off in drawing for individual dimension based on specified increments (such as to the nearest 5 or 10)

Please vote, maybe it will be implemented.

Hello,

I don't know why you would want to do this, but it wo0uld be better to restrict the part itself to the multiples of 50 and not modify the drawing.

You can use equations in the part file to drive this.

In Manage Equations, create Global variables:

MultipleFactor = 50

MultipleCount = INT(

PartDimension/ MultipleFactor)MultipleRemainder =

PartDimension- (MultipleCount * MultipleFactor)MultipleRemainderAdder = if(((MultipleRemainder) > (MultipleFactor/2)), 1, 0)

MultipleDim = (MultipleCount + MultipleRemainderAdder) * MultipleFactor

This sets the variable "MultipleDim" to the closet multiple, (optionally) rounding up.

So a

PartDimensionof "460.12" would make "MultipleDim" = 450MultipleCount = INT(460.12 / 50) = 9

MultipleRemainder = 460.12 - (9 * 50) = 10.12

MultipleRemainderAdder = if(((10.12) > (50/2)), 1, 0) = 0

MultipleDim = (9 + 0) * 50 = 450

A

PartDimensionof "475.12" would make "MultipleDim" = 500In Manage Equations, use "MultipleDim" to equate the part dimension that drives the feature.

SW Drawings don't have equations and it's best that the drawing truly reflect the part.

Cheers,

Kevin

EDIT: If you wish to just override the dimension's value, select the dimension and in the Proprty Manager, delete "<DIM>" and type in the value you want.

You may get a warning message, but you can continue modifying the dimension value.

Also, on the value tab, you can check to override the value.

EDIT 2: A caution on overriding a dimension (for any reason):

With <DIM> removed form the dimension, the drawing dimension is effectively severed from the model and regardless of all model changes, the dimension will not change.

Additionally, there's no apprearance difference between a dimension that has its <DIM> and one that doesn't.

So, not only must you remember every such dimension and maintain them, you must inform everyone else that these dimensions will not update to their models.