Hello
I would like to round some of the dimensions on my SolidWorks 3D models to 0.005 mm higher.
E.g.: 0.149 → 0.150 // 0.154 → 0.155
And find these same roundings in the drawings.
Thank you in advance.
Hello
I would like to round some of the dimensions on my SolidWorks 3D models to 0.005 mm higher.
E.g.: 0.149 → 0.150 // 0.154 → 0.155
And find these same roundings in the drawings.
Thank you in advance.
Tools menu/Options/Document properties/Dimensions/Primary precision==> drop-down menu with 2/3/4 etc... digits after the decimal point.
It's not a rounding to 0.005, with this method we will have: 0.154 → 0.15 and not what I'm looking for which is 0.154 → 0.155.
Hello, and welcome
The formula is:
=int("val" * 2 + 0.999) / 2
So if you want to round to the thousandth it gives:
=int(("val"*100) * 2 + 0.999) / 2 / 100
either:
=int("val" * 200 + 0.999) / 200
where " val " is the value of the odds.
If " val " is:
0.140 → 0.140
from 0.141 to 0.144 → 0.145
from 0.146 to 0.150 → 0.15
from 0.151 to 0.155 → 0.155
etc
On the other hand, it also rounds the value of the odds, not only its display.
But if there is a need to find it, the original value remains visible in the equation.
@Sylk I had thought well via the equations as well, but for me it doesn't really meet the demand to round off certain odds of the 3D and then the MEP.
On the other hand, the solution you propose seems to me the only possible one, to see if it can be suitable.
That said, why round the value on the MEP and not on the 3D?
Sorry, misread the request
I have an idea for a concept but I can't find the file that would allow it. If it is in plain text.
My idea would be to find the definition file of the eligible variables in the " Rating text", such as the <DIM>
, to create a new variable named <RND-SUP-MILLI>
and whose definition would be:
int( <DIM> * 200 + 0.999 ) / 200
If anyone knows where the file of these variable definitions is, I'm interested.
In practice, in the dimension text, instead of <DIM>
, we would <RND-SUP-MILLI>
enter , which would have the effect of displaying the rounded value on the dimension but without affecting its value.
@Sylk I think the idea is very good, so there is no need to round the dimension on the 3D model, it will "just" be enough to replace the dimension in the dimension(s) that you want to round on the MEP.
@Sylk The path to the file you are looking for may be in the same location as the " Ø ".
I'm putting you a link that may help you: MOD-DIAM instead of the Ø symbol in SOLIDWORKS? Here's how to fix it! - Visiativ CH
Alas, no
I doubt that it is accessible in a file, for me it is hard in the software (and therefore even less possible to add a formula in the form of a variable)
In addition, it seems dangerous to me (very different dimensions in each other) to have a text value different from the dimension, hence the impossibility of putting formulas in this dimension text and the obligation to do it upstream in the 3D via an equation.
One possibility would perhaps be to go through a family of rooms. (Easier to write formulas in Excel.)
The formula is a simple operation and the int() value casting is probably the most universal function in programming, I don't worry too much about that. What I'm more afraid of is that the definition of the DIM is in a binary file, and/or worse, that it's just a simple call to an internal variable or function (retrieving the dimension value) of SW. This would exclude the use of a calculation formula.
As for the " danger ", the only " risk " is that the value will not be displayed if the document is exported to a workstation that does not have the modification.