Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Can I set a Feature UI preview tolerance with Featurescript?

EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
I'm working on a feature that uses refractive indexes of various materials, and one of them defaults to 1.00027717 (which is air), instead of 1 (which is a vacuum). When you just look at the feature UI though, all of it is rounded to 1 until you click the field to edit it, so a user wouldn't understand what the default number actually is. Is there a way I can control how many decimal places to preview?
Evan Reese

Answers

  • glen_dewsburyglen_dewsbury Member Posts: 782 ✭✭✭✭
    The only way I know of is the work space units and changing decimal places there. Can you temporarily change the work space properties while in your function?
  • _anton_anton Member, Onshape Employees Posts: 410
    Crude workaround, but you could use a string parameter, which will display your value literally, and use stringToNumber in FS.
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Thanks for the ideas. Either of those are even less desirable, so I'll roll with it as-is, but very much appreciate the input 
    Evan Reese
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,680
    Perhaps you could display an info banner with the actual number with a description?
    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.