If you use the | | buttons, you can be sure that the correct syntax is used when creating the formula.
- This button only transfers the variable displayed under Name to the input field. 
- An algorithm built using an IF condition can look like this: - IF ( ) THEN D3 = ELSE D3 = ENDIF - Enter your condition between the brackets () (e.g. "L1.EQ.10"). In this example, "D3" is the variable selected in the variable list. - After THEN D3 = enter the value that D3 should assume if the condition is met . - After ELSE D3 = is the value for D3 if the condition is not fulfilled . End the condition with ENDIF . - IF (L1.EQ.10) THEN D3 = 20 ELSE D3 = 30 ENDIF 
- -> The following is generated: - ELSEIF ( ) THEN <selektierte Variable> = - If case distinctions are to be made, ELSEIF statements can be used. - IF (L1.EQ.10) THEN D3 = 10 ELSEIF (L1.EQ.20) THEN D3 = 20 ELSEIF (L1.EQ.30) THEN D3 = 30 ELSE D3 = 40 ENDIF 
- Several IF conditions can also be connected in series within a feature algorithm variable [Attribute algorithm]. - The use of a single IF condition with ELSEIF case distinctions would often lead to much more complex solutions with many more ELSEIFs. - Structure of the conditions using an example: - The first IF condition must contain an ELSE alternative to ensure that the variables are initialized. The remaining IF conditions can optionally contain ELSE alternatives. - IF (OPZ1.EQ.'-' )THEN LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1.' ELSE LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1./$OPZ1.' ENDIF IF (OPZ2.EQ.'-' )THEN LINAALG = '$LINAALG./' ELSE LINAALG = '$LINAALG./$OPZ2.' ENDIF... - Not correct: (The first IF does not contain an ELSE) - IF (OPZ1.NE.'-' )THEN LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1./$OPZ1.' ENDIF IF (OPZ2.NE.'-' )THEN LINAALG = '$LINAALG./$OPZ2.' ENDIF... - Also correct: If the first statement is a simple statement without a condition, an "ELSE" can be omitted completely, as the statement always initializes the variable. - CNSTYPECODE = '$MODEL.$W.-$ST.-$THETA.-$TYPE.-$SPRING.' IF(K.EQ.1)THEN CNSTYPECODE = '$CNSTYPECODE.-K' ENDIF IF(FK.EQ.1)THEN CNSTYPECODE = '$CNSTYPECODE.-FK' ENDIF IF(N.EQ.1)THEN CNSTYPECODE = '$CNSTYPECODE.-N' ENDIF 
- The first condition, which is always calculated, must prevent an infinite loop. Further "if...endif" always call the first condition and add an additional value. - Therefore, do not use the variable of the assignment in the first condition for the ELSE case differentiation. - IF (OPZ1.EQ.'-' )THEN LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1.' ELSE LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1./$OPZ1.' ENDIF IF (OPZ2.EQ.'-' )THEN LINAALG = '$LINAALG./' ELSE LINAALG = '$LINAALG./$OPZ2.' ENDIF... - Not correct: (difference in red) - IF (OPZ1.EQ.'-' )THEN LINAALG = '$IDNR./$CX1./$VL./$MOTX./$OM1./$COEL./$DA./$AP1./$AA1.' ELSE LINAALG = '$LINAALG./$OPZ1.' ENDIF IF (OPZ2.EQ.'-' )THEN LINAALG = '$LINAALG./' ELSE LINAALG = '$LINAALG./$OPZ2.' ENDIF...
 

!["Feature algorithm [Attribute algorithm]" dialog box](https://webapi.partcommunity.com/service/help/latest/pages/jp/3dfindit/doc/resources/img/img_ef7b9988cf6e49cd95d8b4f4c22ebb3a.png)
![[Note]](https://webapi.partcommunity.com/service/help/latest/pages/jp/3dfindit/doc/images/note.png)




