*else()

Defines a branch for an *if() block.

Syntax

*else()
*Body(b_kn, "Knuckle", p_kn_cm)
*Body(b_lca, "LCA", p_lca_cm) 
*Body(b_frame, "Frame", p_frame_cm) 
*PointPair(p_spr_upr, "Spring @ frame") 
*PointPair(p_spr_lwr, "Spring @ lca")
*Option(op_spr, "Spring att @", 3, 
 "Knuckle", "LCA", "UCA")
*if(op_spr.value=="Knuckle")
 *CoilSpring(spring_kn, "Coil Spring", b_kn, 
 b_frame, 
 p_spr_upr, 
 p_spr_lwr)
*elseif(op_spr.value=="LCA")
 *CoilSpring(spring_lca, "Coil Spring", b_lca, 
 b_frame, 
 p_spr_upr, 
 p_spr_lwr)
*else()
 *CoilSpring(spring_uca, "Coil Spring", b_uca, 
 b_frame, 
 p_spr_upr, 
 p_spr_lwr)
*endif()

Context

*BeginMdl()

*DefineAnalysis()

*DefineDataSet()

*DefineSystem()

Comments

The *else() statement is used in conjunction with *if() and *elseif() statements. If all other conditional tests fail (evaluate as false), the statements following the *else statement are executed. Execution continues until an *endif()statement is reached.

Only one *else() statement can be used within an *if() block. If an *if() block contains *elseif() statements, the *else() statement follows the last *elseif().

Both Topology and Property (Set) statements can be used within an *if()/*elseif()/*else()/*endif() block.