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.
toString in Description?
S1mon
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
I believe we only allow plain strings in there. Improvement request?
Ok. I will create an IR. Oddly there's no error either on Commit or in the Monitor. It just fails silently.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
IR here:
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn