Hi all.
I would like to know if it is possible to round the result of an equation.
Thank you in advance.
Hi all.
I would like to know if it is possible to round the result of an equation.
Thank you in advance.
Hello
It is possible to round the equation to the whole number, just add a function in the box of the coast.
I'll put you a picture to be clearer.
I'll add you a picture for the definition of the functions which can be found in the Solidworks help.
Hello paille1384.
I did indeed find this function but it returns the whole number, that's already it.
But not yet precise enough, I would like to round up or down to the next 0.5.
In any case thank you for your help if there is no more answer, I will put you in a resolute answer.
Thank you
Good evening, what will this result be used for?
And send the result of this equation back to a hill that can then be rounded to 1/10th.
Hello, indeed a little presicion can be useful.
So in the equations via the dimensions of my part I calculate its development, what I want is to integrate this result in a note like "the developed is... " so the note updates according to the part.
So I put this variable in a property and then I integrate it into my note.
There you go.
Thank you
Thinking more deeply, I think it won't be possible, a rounded variable is not really a variable anymore.
draw a line outside the format of the drawing, dimension it using the variable, manage the display of the number of decimal places of the dimension, integrate the dimension into the note.
@stefbeno it is not possible to rate on the basis of a variable in the MEP, at least under SW 2014.
Hello, I may have a solution if I have understood everything correctly.
The goal is to create a variable that you then put in ownership and finally that you put a note in your MEP rounded to 0.1. So all this you know how to do apparently.
So for the solution I propose is to make a construction line in your sketch that you dimension it and that you put the equation with your variable to get your result and then if you select your dimension you can round it up to 0.1.
Finally you create a property with this coast and that's it.
I send you my example.
I hope I understood your question well and that it will help you.
Have a nice day.
Hello
I am here a long time after the debate, but I happen to have asked myself the same question. As I don't like to play with rounds in the drawing (it can be tricky for those who modify the plan later), I looked for another way which is as follows:
There is a round() function in the equation editor that rounds to the nearest integer. To round to 1/10, simply round the value to be rounded to the integer multiplied by 10, and divide the result by 10.
Example: =round("D6@Esquisse3"*10)/10