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.

Options

Test Design variations by setting Variables in Feature Script

Hello, I would like to optimize a sketch by experimenting with different variable combinations in FeatureScript. My sketch currently utilizes two dimensions controlled by variables. Now, I want to modify these variables in FeatureScript and calculate the area of a face as a result of these changes.

However, when I set the variables in a loop in FeatureScript and measure the area, I obtain the same results for each iteration. I suspect this is because the sketch isn't recomputed during the execution of the FeatureScript.

Is there a way to trigger a recompute of the sketch while running the FeatureScript, or do I need to create the entire sketch in FeatureScript and then recreate it within the loop with the new dimensions?

Best Answer

Answers

Sign In or Register to comment.