As part of my business, I am asked to convert family tables into equations in SolidWorks. However, I have a problem: some of the resulting values end in 0.33, but they are automatically rounded to 0.5.
I would like to know if it is possible to obtain this same behavior directly via equations in SolidWorks.
I noticed that it's possible to round up or down, but I couldn't find an option to systematically round up to the nearest 0.5 .
Then the answer is " Yes but no ", or " No, but yes ". In the equations, the rounding function is not available. But by extracting the integer part ( int() function), and treating the decimal part with an " if " function, it is possible to arrive at the desired behavior.
Basically the syntax: IIF(X-int(X)<0.5; Int(X); IIF(X-int(X)>0.5; Int(X)+1; Int(X)+0.5)).