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.
Cannot resolve an expression to make a dimension dependent of 3 variables. Someone can help ?
francois_boulet
Member Posts: 65 ✭✭✭
I'm not familiar with scripting. Maybe this is a very simple problem.
PLease see the attached PDF file ...
PLease see the attached PDF file ...
La simplicité est la sophistication suprême.
Léonard de Vinci
Tagged:
0
Best Answer
-
francois_boulet Member Posts: 65 ✭✭✭It Works, Thank you.
And I found another way to do it with a conditional: (#ObstaAv>0?0:#Diff/#ObstaArr) in
Thanks again !La simplicité est la sophistication suprême.
Léonard de Vinci1
Answers
1st equation ([in]/[in])*[in] - ([in]) = [in]-[in] = [in] OK
2nd eq: ([in]/[in])*[in] - ([in]*[in])*[in] = [in] - [in]^3 KO
3rd eq: ([in]/[in])*[in] - ([in]*[in]) = [in] - [in]^2 KO
So
2nd eq should be: (#Diff/#ObstaArr) in-(#Diff*#ObstaAv)/in
#Diff and #ObstaAv both have "in" as their unit already. When multiplied together, the unit becomes in^2 (as expected for multiplying two lengths together). Your expression will work if you do:
((#Diff * #ObstaAv) / in)
but I suspect that what you actually meant to do is have ObstaArr and ObstaAv as unitless numbers instead of lengths? Then your expression would look like:
(#Diff / #ObstaArr) - (#Diff * #ObstaAv)
But that's just a guess, and I can't tell your design intent. You can set a variable to a number instead of a length using the "Number" option at the top:
And I found another way to do it with a conditional: (#ObstaAv>0?0:#Diff/#ObstaArr) in
Thanks again !
Léonard de Vinci