7.8.13.4.2. IF condition: Default value "Forced" or "Standard"

The following example shows how a value range variable (here SEL "Selector ") is used to control another value range variable, once with a standard IF condition (here TFW "Standard ") and once forced (here TFWF "Forced ").

Example in PARTdesigner

Example in PARTdesigner

The start values are displayed when the table is loaded. The start value is represented by the first parameter set in the formula [Equation]. For the selector this is 1, for TFW (TMA) and TFWF (TMAF) the value "alpha" due to the condition set.

Example in PARTdataManager: Standard values loaded

Example in PARTdataManager: Standard values loaded

Feature algorithm [Attribute algorithm] TMA with standard IF condition

IF (SEL.EQ.1)THEN
 TMA = '''a'',''alpha'',''b'',''beta'',''c'',''gamma'''
ELSEIF(SEL.EQ.2)THEN
 TMA = '''b'',''beta'',''a'',''alpha'',''c'',''gamma'''
ELSEIF(SEL.EQ.5)THEN
 TMA = '''xy'',''xy'''
ELSE
 TMA = '''c'',''gamma'',''a'',''alpha'',''b'',''beta'''
ENDIF

Feature algorithm [Attribute algorithm] TMAF with IF condition + forced setting of a value

[Note]Note

With forced setting the starting value (first value in angle brackets) is set always anew.

Correct example:

IF (SEL.EQ.1)THEN
 TMAF = '<''a'',''alpha''>,''b'',''beta'',''c'',''gamma'''
ELSEIF(SEL.EQ.2)THEN
 TMAF = '<''b'',''beta''>,''a'',''alpha'',''c'',''gamma'''
ELSEIF(SEL.EQ.5)THEN
 TMAF = '<''xy'',''xy''>'
ELSE
 TMAF = '<''c'',''gamma''>,''a'',''alpha'',''b'',''beta'''
ENDIF

By default, the start value (the first value) is only set only when the table is loaded, unless the new start value is not contained in the currently set value range.

If you want to force a value, note the following:

  1. The value must be set as the first parameter pair.

  2. The pair of parameters has to be set in angle brackets.

  3. It is recommended to set a forced value in every condition or in none, otherwise the behavior could be confusing.

    Example: Here, in the second condition there is no forced value, what is not recommended.

    IF (SEL.EQ.1)THEN
    TMAF = '<''a'',''alpha''>,''b'',''beta'',''c'',''gamma'''
    ELSEIF(SEL.EQ.2)THEN
    TMAF = '''b'',''beta'',''a'',''alpha'',''c'',''gamma'''
    ELSEIF(SEL.EQ.5)THEN
    TMAF = '<''xy'',''xy''>'
    ELSE
    TMAF = '<''c'',''gamma''>,''a'',''alpha'',''b'',''beta'''
    ENDIF
    

Description of the behavior in the PARTdataManager (resp. PARTdesigner Table):

[Note]Note

A number variable can also be used for the selector.

IF (SEL.EQ.1)THEN
 NMA = '<1,''alpha''>,2,''beta'',3,''gamma'''
ELSEIF(SEL.EQ.2)THEN
 NMA = '<2,''beta''>,1,''alpha'',3,''gamma'''
ELSE
 NMA = '<3,''gamma''>,1,''alpha'',2,''beta'''
ENDIF