Conditions that Make Your Design Work the Way You Want

Return to Newsletter home>>

Conditional formula

For each 3D and 2D parametric design, conditions exist where variables need to have a specific value.

Classic example: As a part gets longer; holes need to be added to maintain a safe distance between them.

Logic arguments

Basic principle consists of verifying a condition with the help of arguments. Logic arguments used
by Solid Edge:

• Lesser than <
• Equal =
• Greater than >

Once a condition is verified, Solid Edge returns a value showing if the condition is valid (true) or
non-valid (false).

• For a valid condition (true), the returned value is -1
• For a non valid condition (false), the returned value is 0

Note:
The arguments can be combined: Equal or Greater than ( => )

Isolate arguments

Each time we need to verify a condition, isolate it between parenthesis

• = (Width = Length)
• = (Width < Length)

Example of a conditional syntax:

Length Width Depth
3.000 3.000 (Length = Width)

= (Length = Width) ⇒ Valid condition (-1) ⇒ Return value for the Depth is -1

Absolute value

To ensure a positive value is returned, the use of the mathematical argument ABS can be used.

=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 for the Depth is 1

From this simple example, it is easy to understand that we need to multiply the return value by the desired
quantity.

Based 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

Logic operators

When more than one condition needs to be validated, it is necessary to use the operators «AND»
… «OR». Notice arguments have been combined 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))

Note:

1. Operator * and + can be use to replace AND…OR, but I recommend keeping those for mathematic
operations. This should help make the writing and reading easier.
2. It may be more practical to use a control value(s) to help the writing and the reading of the formula.
http://soliddna.wordpress.com/synchronous_technology/sewst-interface/variables-table/

=ABS (3*(Length => Value_min) and (Length < Value_max ))

In order to help you manipulate and build conditional formulas, I break the process into
four steps. Following these steps will help you in the writing of a complex formula.

These steps 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

Conditional formula

Step 1
2 holes ⇒ 0 – 6 inch               3 holes ⇒ 6 – 12 inch          4 holes ⇒ 12 +
Step 2
2*(Length <= 6)                       3*(Length > 6)                    4*(Length > 12)
3*(Length <= 12)
Step 3
2*(Length <= 6)    or     3*(Length > 6)     and     3*(Length <= 12)     or     4*(Length > 12)
Step 4
=ABS((2*(Length <= 6))     or     (3*(Length > 6)     and     (Length <= 12))     or     (4*(Length > 12)))

Conditions that make your design work the way you want

Return to Newsletter home>>