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.
Addition and Subtraction in equations in Part Studio
joel_smith140
Member Posts: 4 ✭
Greetings! I'm trying to use equations with a declared variable while dimensioning a part, but can't seem to get the editor to accept addition or subtraction as valid entries.
For example, I'd like to place a point for a hole that is 1 inch to the side of the center of my part. I'm able to place the point at the center point with the following set-up:
But if I try to use a "+" or "-" sign, the equation box turns red and it won't accept the equation.
I have tried to complete this operation with and without parentheses. I have also tried to use "-1 + (#BaseWidth/2)" and "1 + (#BaseWidth/2) thinking that I might be able to accomplish it with addition, but no luck. Is there a way to utilize addition and subtraction in this environment, or are we restricted to multiplication and division.
Thanks for your assistance!
For example, I'd like to place a point for a hole that is 1 inch to the side of the center of my part. I'm able to place the point at the center point with the following set-up:
But if I try to use a "+" or "-" sign, the equation box turns red and it won't accept the equation.
I have tried to complete this operation with and without parentheses. I have also tried to use "-1 + (#BaseWidth/2)" and "1 + (#BaseWidth/2) thinking that I might be able to accomplish it with addition, but no luck. Is there a way to utilize addition and subtraction in this environment, or are we restricted to multiplication and division.
Thanks for your assistance!
0
Comments
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
This also gives you the flexibility to mix units where it makes sense, as well. If my workspace units are mm, but I know something needs an offset of 1.5in to accommodate an off-the-shelf component, I can do something like "30mm + 1.5in" and it'll work out.
I would also recommend taking a look through the help article on fields here. There's actually a lot of interesting things in there - for example, it's possible to use the ternary operator (?) in fields, which can be occasionally helpful when doing configurations.