Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
"Round to the value" option in Variable feature
konstantin_shiriazdanov
Member Posts: 1,221 ✭✭✭✭✭
When using expressions for part studio varible definition you often want a rounded value but all you can now is to use roundToPrecision() function from standart library. It is not only too long to type in a small text field of variable feature, but also it has no overloads for values with units. Parametric capabilities given by variables are significantly reduced by not having a direct way to get rounded value. So please add a checkbox "Round to the value" and an input field with the value to round up to. The formula should be universal for values with units and unitless, and shouldn't depend on units itself - for example value = round(value/roundStep)*roundStep, and should post process any result of expression, assigned to variable if "Round to the value" checked.
Tagged:
1
Comments
round(value, roundStep);
?IR for AS/NZS 1100
https://cad.onshape.com/FsDoc/library.html#round--
IR for AS/NZS 1100