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.
need help defining a formula value within a variable
john_lopez363
Member Posts: 110 ✭✭
I have this variable defined. As you can see I am using two other variable definitions to define the value of a third variable. As written it works just fine. Im taking the #slat_width multiplying by a factor of .87 and then dividing by the #slat_slot_count to define the #slat_slot_distance.
What I NEED to do instead is subtract a value (70) from #slat_width variable then divide it by the #slat_slot_count variable.
However when I replace the multiple (*) with the subtract (-) operator it fails. What am I doing wrong/how do I fix this?
What I NEED to do instead is subtract a value (70) from #slat_width variable then divide it by the #slat_slot_count variable.
However when I replace the multiple (*) with the subtract (-) operator it fails. What am I doing wrong/how do I fix this?
0
Best Answer
-
MichaelPascoe Member Posts: 1,989 PRO
For multiplication and division, you can multiply a (value with units) by a (unitless value): 45in * 4
However, for addition and subtraction, both values need to have similar units: 45in - 5m
So you could not do:
45in - 5
45in - 5in^2
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴0
Answers
For multiplication and division, you can multiply a (value with units) by a (unitless value): 45in * 4
However, for addition and subtraction, both values need to have similar units: 45in - 5m
So you could not do:
45in - 5
45in - 5in^2
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴