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.
Driven variable in driven dimension?
andy_cate
Member Posts: 5 EDU
Hi, I am a beginner in Onshape. I have been experimenting with variables in my sketches, and have come across a problem. I want to have a variable that is in a driven dimension. Any help would be appreciated!
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,688You could also use the Measure Distance FeatureScript feature to automatically create your variable.Senior Director, Technical Services, EMEAI5
Answers
You can use dimensions in sketches the same way you use them in feature dialogs, by using: #whateverYouNamedYourVaraible (a pound sign followed by your variable name)
This is something that Onshape could improve a lot, you need to run also other dimensions with variables and calculate the missing value from those. You can't directly reference to existing dimensions and you can't change parameter value by adding parameter name to driven dimension (which would be pretty awesome though!).
So if you need to know where is midpoint of line. Add parameter L for line length and create another parameter Lmid= #L / 2
This would be a HUGE improvement in my opinion, especially for parametric designs.
There is also a Measure Length FeatureScript that works similairly
https://cad.onshape.com/documents/3b94cb37940c65d6eb867804/w/37d878fd02dc9e537e399972/e/2532eb32e49f33d7e990100b