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.

zero length parameter?

adamohernadamohern Member, OS Professional Posts: 216 PRO
It appears that zero length parameters are not allowed. Is that true? I realize I could use a boolean value or something to effectively zero out (and remove) the length, but this adds an extra control that I'd rather not have cluttering up my UI. Is there a way to add a zero length that I'm just not seeing?

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 447
    If you use the standard LENGTH_BOUNDS, it looks like yes, zeros are forbidden in the UI.

    However, there's more bounds available in the valueBounds module. If you replace LENGTH_BOUNDS for a particular parameter with NONNEGATIVE_ZERO_INCLUSIVE_LENGTH_BOUNDS or even NONNEGATIVE_ZERO_DEFAULT_LENGTH_BOUNDS then zeros are golden. You can also make your own LengthBoundSpec if you have more particular needs.

    The docs on LENGTH_BOUNDS actually looks wrong now (It say it allows zero, but that's only true when you call the feature within FS, not in the UI). I'll fix.

  • adamohernadamohern Member, OS Professional Posts: 216 PRO
    Ahh, okay. I was defining my own LengthBoundSpec, but a user error was keeping it from working. Your reassurance that it should work made me take a second look, hence finding the problem. Thanks.
Sign In or Register to comment.