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.

Options

Can I set a Feature UI preview tolerance with Featurescript?

Evan_ReeseEvan_Reese Member Posts: 2,066 PRO
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 / Principal and Industrial Designer with Ovyl
Website: ovyl.io

Answers

  • Options
    glen_dewsburyglen_dewsbury Member Posts: 595 ✭✭✭
    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?
  • Options
    _anton_anton Member, Onshape Employees Posts: 279
    Crude workaround, but you could use a string parameter, which will display your value literally, and use stringToNumber in FS.
  • Options
    Evan_ReeseEvan_Reese Member Posts: 2,066 PRO
    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 / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • Options
    NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,417
    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.