For each 3D and 2D parametric design, conditions exist where variables need to have a specific value.
Classic example: Has a part get longer; holes need to be add to maintain a safe distance between them.
Basic principle consists of verifying a condition with the help of arguments. Logic arguments use by Solid Edge:
- Smaller then <
- Equal =
- Larger then >
Once a condition is verify, Solid Edge return a value showing if the condition is valid (true) or non-valid (false).
- For a valid condition (true), the return value is -1
- For a non valid condition (false), the return value is 0
Note: All those arguments can be combining to create anoter one like: Equal or larger then ( => )
Each time we need to verify a condition, isolate it between brackets
- = (Width = Length)
- = (Width < Length)
Example of a conditional syntax
|3.000||3.000||(Length = Width)|
= (Length = Width) » Valid condition (-1) » Return value for the Depth is -1
- To ensure a positive value is return, the use of the mathematical argument «ABS» can be use.
=ABS (Length = Width) » Valid condition ABS (-1) » Return value for the Depth is 1
- A multiplier argument can also be use:
= -1*(Length = Width) » Valid condition -1*(-1) » Return value fo the Depth is 1
From that simple example, it is easy to understand that we need to multiply the return value by the desire quantity.
Base on this:
= -3*(Length = Width) » Valid condition -3*(-1) » Return value is 3
=ABS (3*(Length = Width)) » Valid condition ABS(3*(-1)) » Return value is 3
When more than one conditions need to be validating, it is necessary to use the operators «AND» … «OR». Notice arguments has been combine to indicate we need to check the length to be «equal or larger then»
=ABS (3*(Length => 6) and (Length < 12))
= -3*(Length => 6) and (Length < 12))
1. Operator * and + can be use to replace AND…OR, but I recommend keeping those for mathematic operations. This should help make the writing easier and the reading too.
2. It could be more practical to use a control value(s) to help the writing and the reading of the formula.
=ABS (3*(Length => Value_min) and (Length < Value_max ))
In order to help you manipulate and build conditional formula, I resume the process in four steps. Following those steps will help you in the writing of complex formula.
This resume can also be use has a tutorial.
Step 1 – Identify the conditions
Step 2 – Write the condition
Step 3 – Add necessary logic operators
Step 4 – Wrap everything into a single formula