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.

toString in Description?

S1monS1mon Member Posts: 4,096 PRO

I'm trying to give a tooltip for a UI parameter using the description and I'd like it to show the range. I know if I enter a value outside of the boundsRange it will show the range automatically, but it would be nice to have some hint of what that range is without guessing. It seems like creating a const or inlining the string concat with toString() on the boundsRange entries is not working.

const TOLERANCE_DESCRIPTION = "Stops iteration once motion and hinge residuals are small enough. Range: " ~ 
toString(boundsRange(TOLERANCE_BOUNDS)[0]) ~ " to " ~ toString(boundsRange(TOLERANCE_BOUNDS)[1]) ~ "."; 


annotation { "Name" : "Tolerance",

"Description" : TOLERANCE_DESCRIPTION }

isReal(definition.tolerance, TOLERANCE_BOUNDS);

Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.