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.
Configurations & if Statements
Nath_McC
Member Posts: 127 PRO
Hi,
I am coming from Solidworks and i would have normally put a simple if statement in the dimensions to get the desired result but that is not the case in onshape.
I have a model of a pin and a hole. Currently the pin has a variable of #PinD and basically I want to incorporate the following if statement for the hole
If ( #PinD * 1.2 > #PinD + 3 , #PinD * 1.2, #PinD + 3 )
Basically the hole to be which ever size is grated, #PinD * 1.2 or #PinD + 3
What is the best way to add this into the model?
I am coming from Solidworks and i would have normally put a simple if statement in the dimensions to get the desired result but that is not the case in onshape.
I have a model of a pin and a hole. Currently the pin has a variable of #PinD and basically I want to incorporate the following if statement for the hole
If ( #PinD * 1.2 > #PinD + 3 , #PinD * 1.2, #PinD + 3 )
Basically the hole to be which ever size is grated, #PinD * 1.2 or #PinD + 3
What is the best way to add this into the model?
0
Best Answers
-
TimRice Member, Moderator, Onshape Employees Posts: 315Our numeric inputs are actually quite flexible. This is possible using a ternary operator, as seen in the example below:
This applies to any numeric input in our product (both part studios and assemblies).
Tim Rice | User Experience | Support
Onshape, Inc.6 -
RyanWiebe Member Posts: 8 ✭✭TimRice said:Our numeric inputs are actually quite flexible. This is possible using a ternary operator, as seen in the example below:
This applies to any numeric input in our product (both part studios and assemblies).0
Answers
This applies to any numeric input in our product (both part studios and assemblies).
Onshape, Inc.