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.
Equation not working. Need help
Best Answers
-
No units they are copy and pasted from the dialogabefeldman said:Do either of the variables have units? It might be worth removing the units from the variables and adding them in the dimension instead.
0 -
Yes, the underlying problem is the unit mismatch. Regardless of whether it was a length or angle, the fact that the variables had units and the number they were being added to did not was causing the problem. Removing the units from the variables or adding it to the number are both valid ways of fixing the issue.Abe Feldman
UX/PD/Community Support6 -
Answers
-
did you tried (245-(#ARC1+#ARC2))/2 or (245-#ARC1- #ARC2)/2 ?
0 -
Do either of the variables have units? It might be worth removing the units from the variables and adding them in the dimension instead.Abe Feldman
UX/PD/Community Support0 -
No units they are copy and pasted from the dialogabefeldman said:Do either of the variables have units? It might be worth removing the units from the variables and adding them in the dimension instead.
0 -
Neither of these work unfortunatleykonstantin_shiriazdanov said:did you tried (245-(#ARC1+#ARC2))/2 or (245-#ARC1- #ARC2)/2 ?
0 -
Testing this out I set
ARC1 = 45 deg
ARC2 = 45 deg
All of the equations but the last fail because 245 does not have consistent units with either of the variables.
Changing the variables to the "Any" unitless option succeeds:
ARC1 = 45
ARC2 = 45
Or you could enter ((245*deg)-(#ARC1+#ARC2))/2, but be sure there's no "deg" unit appended to the end.Abe Feldman
UX/PD/Community Support0 -
I have not used degree units! The ARC1 and ARC2 are lengths defined only by a number in my document (FYI they are arc lengths not arc degrees)abefeldman said:Testing this out I set
ARC1 = 45 deg
ARC2 = 45 deg
All of the equations but the last fail because 245 does not have consistent units with either of the variables.
Changing the variables to the "Any" unitless option succeeds:
ARC1 = 45
ARC2 = 45
Or you could enter ((245*deg)-(#ARC1+#ARC2))/2, but be sure there's no "deg" unit appended to the end.
0 -
I need to eat a little crow now... In the end if I added mm to the 245 it works thus (245mm-(#ARC1+#ARC2))/2 works but (245-(#ARC1+#ARC2))/2 does not.0
-
Yes, the underlying problem is the unit mismatch. Regardless of whether it was a length or angle, the fact that the variables had units and the number they were being added to did not was causing the problem. Removing the units from the variables or adding it to the number are both valid ways of fixing the issue.Abe Feldman
UX/PD/Community Support6 -
It would be nice if the variables defaulted to unitless. IMHO1
-
-
I'm having the same issue. Cannot remove the units from the variables, nor does it access units in the calculation.
For example, in the calculation:
((#depth/#joins))-0.2) mm
→ this works
(#depth/#joins)+#adj
(#depth/#joins)+#adj mm
→ neither of these are accepted and I get the error message: "cannot subtract unitless number and length"0 -
(#depth/#joins) is unitless.
#adj has units.
you could do (#depth/#joins mm)+#adj
What you probably want to do is switch joins to be a number not a length. Then the equation would be #depth/#joins + #adj.
Simon Gatrall | Product Development, Engineering, Design, Onshape | Ex- IDEO, PCH, Unagi, Carbon | LinkedIn
1






