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.

Trouble with default values in feature script

jason_ryan337jason_ryan337 Member Posts: 16

Hi all,

I am close to releasing a feature script to the community, but I am struggling with getting the feature to use the default sizes that I pre-populated. For some reason the sizes keep going to 25mm and the qty keeps going to 2. When the qty doesn't default to 1 it also messes up my attempt to hide a sub-menu about the distribution of the parts.

Any help would be great! Thanks!

https://cad.onshape.com/documents/880276dfd0551b289c861d1f/w/9cc45a96d7a87ec1d9960240/e/6fb6e61632b3afd93ac8bc61

image.png

Comments

  • Matt_ShieldsMatt_Shields Member, Onshape Employees Posts: 790 PRO

    This will get you a parameter with a range of 0-1000 and a default of 60.

    annotation { "Name" : "Wheel Diameter"}
    isLength(definition.diameter, { (millimeter) : [0, 60, 1000] } as LengthBoundSpec);
    
Sign In or Register to comment.