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.

Can Custom Feature Scripts Create Variables Automatically?

david_dalton526david_dalton526 Member Posts: 3
edited October 2021 in Community Support
Would there be a way for me to create a feature script in which it will make a variable automatically with the only input from a person being the value. For ex. I'm trying to create a feature script to make bolt hole patterns that require an equation that uses multiple variables. I need to create variables that you can change when you open the feature script instead of opening every variable one at a time. If that is possible, would I be able to configure those variables inside of that feature script? 

Best Answer

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Answer ✓
    Yes! setVariable can be used to create new variables from FeatureScript.
    Senior Director, Technical Services, EMEAI

Answers

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Answer ✓
    Yes! setVariable can be used to create new variables from FeatureScript.
    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.