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.
How to drive dimensions from other dimensions
mitchel_palmer
Member Posts: 20 ✭✭
In Solidworks you can use dimensions to drive other dimensions. The process is you use "=" then click on the dimension you want to reference, you can add a formula if you want as well. Eg: = "D1@Sketch1"*2" (this makes this dimensions 2 times bigger than D1)
How do you do this in OnShape (this is a feature we use regularly in SW)?
thanks in advance.
Mitch
How do you do this in OnShape (this is a feature we use regularly in SW)?
thanks in advance.
Mitch
Tagged:
0
Best Answer
-
thomas_kozak Member Posts: 38 ✭✭Not possible currently, sad to say. There's an improvement request similar to this which I'll link if I can find it.
A possible workaround is to use the "measure length" featurescript, but this only works if you have the driven dimension in a separate sketch from the driving dimension.
Edit: here is the improvement request thread (which includes discussion of some related improvements as well)6
Answers
For example, in the sketch you have shown, you could create a variable called #height in the Feature Tree. Then in the sketch you would set D1 to be "#height" and then set D2 to be "#height * 2".
Totally Agree. It would be nice to be able to do it all within the sketch.
A possible workaround is to use the "measure length" featurescript, but this only works if you have the driven dimension in a separate sketch from the driving dimension.
Edit: here is the improvement request thread (which includes discussion of some related improvements as well)
how would that would if i wanted to make a line say 2/3 of the other dimension?
cheers.
There are a lot of cool old drafting tricks that one could use inside a CAD program. However, I expect a fully modern system to have better and more tools so we don't have to resort to old tricks. I do teach a number of hand-drawing tricks still when I teach an engineering graphics course, but I preface it by saying that not everyone will have access to a fully-featured CAD system when they get a job. I kind of expect Onshape to fit into the "fully featured CAD system" category.
In this case, I would love to see every sketch receive a system generated variable name, i.e. d1, that can be referenced when creating a new dimension by simply clicking or right-clicking on an existing dimension. This would not preclude nor interfere with the use of custom (user created) variables.
Currently, after defining a Configuration Variable, we can enter its value in the Configurations panel on the upper left corner. If we can refer to an existing dimension instead of a manual input, it can then be used to drive other dimensions from a reference dimension.
I would link it but I can't get a url from the android app. And it wont open in a mobile browser yor some reason.
It works by creating a feature that is a parameteric variable. Set to one of many measurement types. Like distance between 2 points; perimeter, etc.
It is not as simple as Solidwork's solution. But it is more powerfull as you can select many different measurment options.
I've used it to calculate flat patterns of sheetmetal helix parts before onshape released cylidrical sheetmetal bends.
It is worth a try
EDIT:
Here is the link to the feature script
https://cad.onshape.com/documents/77baa8153589a7fc5f289829/w/cffd0f2a7077380d5378a885/e/181cb871f3008e6b885df46a
Currently, after defining a Configuration Variable, we can enter its value in the Configurations panel on the upper left corner. If we can refer to an existing dimension instead of a manual input, we can then use this definition for any calculation/ if-condition. This is exactly what we are requesting for in this post.
Here's an even fancier example where I have d1 as a driven dimension and with d2-d6 as 90% of the value next to it, and have the spacing from the left and right driving everything. In true parametric style, I can adjust the overall dimensions of the outside square and everything will maintain this relationship.
Here you can see I changed the overall width from 120 to 90 and everything rearranged itself naturally.
Is there any plan to mimic these features? I don't just use this for goofy aesthetic things, but also for calculating physical features based on a host of parameters. It's kind of the definition of parametric
Another work method, accomplished by features referencing a variable there are very powerful things that can be done, as shown in the awesome document that @NeilCooke put together. Look at how variables can be used in features themselves: https://cad.onshape.com/documents/9a3f64ab744a96da45b27081/w/4ba0dec5b3e40ceaf77c9dfc/e/8d1382e0cf2f467c2f2e1d87
And the simple sketch based approach mentioned above that has previous dimension multipled by .9
Thanks for sharing this with us.
Brian
HWM-Water Ltd
HWM-Water Ltd
https://forum.onshape.com/discussion/15006/improvements-to-onshape-december-10th-2020/p1