Popular Topics

# Controlling the SOLIDWORKS numbers

Recently, I have received several questions about controlling the precision of values in SOLIDWORKS. 2015 now makes that easier, but only at a global level. A new rounding function was added to the document property under the units.

Decimal rounding rules:

Round half away from zero – (standard rounding) if the value of the digit after your precision is a 5 or higher, then it will round up to the next value.

Round half towards zero – (Reverse of standard rounding) if the value of the digit after your precision is a 5 or lower, then it will round down to the next value.

Round half to even – Using this method will remove the 5, then round the value based on an odd or even number. For example, if your value is 3.125 and you are rounding to two decimal places, you would first remove the 5 so the value becomes 3.12. You then look at the last digit, and if it is even, then the value does not change. In this example the values stays as 3.12. (If the value of the previous number was odd, then you round up to the next even number)

Truncate without rounding – This method will remove all values after your decimal precision without rounding the value. For example 4.257 truncated to two decimal places would just be 4.25.

The option at the bottom of the window: Only apply rounding method to dimensions only applies to parts and assemblies, and only applies the rounding rule to dimensions and their tolerances. When this option is cleared, the rounding rule will apply to any numeric display where rounding occurs (Including dialog boxes such as Mass Properties).

The limitation that we currently have with this new added functionality, is that it is a document property, so it applies to the whole document and cannot be applied to just a single dimension. So how can you control values of an equation or Bill of Material?

Click on the column heading that you want to control. On the formatting toolbar, click the epsilon symbol to enter the equation tools.

The BOM reads the values directly from the properties of the components, but the precision (number of decimal places) can be controlled using equations. The precision of an equation must be set before writing the equation. If the equation is entered first, then the precision is set using the drop down menu, the precision syntax is added to the end of the equation and does not solve correctly (this is a known bug)

For example,
{2}"\$"'Cost'*'QTY.'

If you are looking for some additional information on this, search the SOLIDWORKS help menu, Search the Knowledge Base, check the My.SOLIDWORKS forums.

We hope this has given you some additional insight on how you might be able to display your values of you drawings.   Please check back to the CATI Blog as the Dedicated Support Team will continue posting new series of articles every month that go further into the details of many of the SOLIDWORKS tools. All of these articles will be stored in the category of Daily Dose…..of SOLIDWORKS Support.

Bryan Pawlak, CSWE

SR Application Engineer

Computer Aided Technology, Inc.