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.
Expression syntax. Addition does not work in expression, but multiplication does
nick_papageorge_dayjob
Member, csevp Posts: 845 PRO
I must be missing something super easy here, but I could not find the answer searching help or searching the forum. I made a length variable d=28.3mm in the tree. Inside sketcher, when I type 8*#d, it works. If I type 8+#d, I get an error, and the expression won't solve. I tried using parenthesis, putting the plus on the other side of the d, using extra spaces, etc. What am I missing? Thanks.
0
Best Answers
-
nick_papageorge_dayjob Member, csevp Posts: 845 PROI found the issue. It was the units. If I typed a mm in the expression, it worked. Or, if I changed the #d to be a unit-less number instead of a length, it worked.1
-
NeilCooke Moderator, Onshape Employees Posts: 5,714It is usually best to keep the units (in case somebody changes the workspace units). So the syntax should be 8mm + #d (where #d is in mm).Senior Director, Technical Services, EMEAI1
Answers