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( ) function
tim_ashby
Member Posts: 3 ✭✭
Is it possible to specify the number of decimal places that the round( ) function rounds to? The standard Excel format of round(number, dp) doesn't seem to work. Alternatively, is there a workaround?. Thanks!
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,688round(value * 100) / 100 should do the trick (to 2 dp)Senior Director, Technical Services, EMEAI2
Answers
round(value, .01) is probably what you are looking for rather than round(value, 2):
https://cad.onshape.com/FsDoc/library.html#round--
Part of my code
www.leontulling.nl