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.
variable default value with MIN and MAX for length input
georg_von_vietinghoff
Member Posts: 9 ✭✭
How can I specify a default value for a length input and also specify a minimum and maximum value? The values are again dependent on a previously made selection.
I found the defineLengthTolerance command in hole.fs, but I can't reproduce it.
I found the defineLengthTolerance command in hole.fs, but I can't reproduce it.
Tagged:
1
Comments
That LENGTH_BOUNDS is just a map, and you can write your own. For example:
annotation { "Name" : "My Length" } isLength(definition.myLength, { (inch) : [ -10000, /* min (inclusive) */ 1.0, /* default */ 10000 /* max (inclusive) */ ] } as LengthBoundSpec );export const LENGTH_BOUNDS = { (meter) : [-500, 0.025, 500], (centimeter) : 2.5, (millimeter) : 25.0, (inch) : 1.0, (foot) : 0.1, (yard) : 0.025 } as LengthBoundSpec;