Let's assume a simple part with "Length" and "Width".
User wants to set the "Width" to 50mm if "Length" is less or equal 100mm, otherwise "Width" should be set to 75.
This often was realized by using a condition like "(Length<=100)", which in theory results in True/False, or -1/0.
Using "old" style (before "IF" was implemented), the user had to create a formula like this:
Last two lines ("T", "F") are just showing the values of the comparison, and will not be needed.
Problem with this workaround is, that internally Solid Edge is using 12 decimals, and sometimes there are differences at the very last digit, so a length of e.g. 100mm could be shown internally as 100.00000000001mm, which in fact is quite the same for the user (and the part), but the comparison will not recognize as "exactly 100mm, and therefore will return a wrong result.
This can lead to very unexpected results and unwanted errors/costs in production.
SolutionSince the implementation of "IF" in Variable Table (working fine since ST10), there is a much easier (and stable) way of doing comparisons:
"IF" is returning the second parameter/value ("50"), if condition ("Length <= 100) is True, and returning the third parameter/value ("75"), if the condition is False.
The great advantage (beside the better readability) is, that "IF" is taking care of decimals, and will round the internal value to an internal precision, so "100.000000001" will be taken as equal to "100".
Therefore "IF" is easier to use and more stable.
Hint: Using "Function Wizard" in Variable Table will lead you through the parameters step by step.
Notes