*elseif()

Defines a conditional branch for an *if() block.

Syntax

*elseif(condition)

Arguments

condition
Any valid expression that evaluates to a numeric value.
*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

An *elseif() condition is evaluated only when a preceding *if() or *elseif() condition has been evaluated as false. An *if() block can contain any number of *elseif() statements. Each *elseif() is evaluated in turn until a true condition results, or an *else() or *endif() statement is encountered.

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

*If() statements can be used only with MDL topology statements, not with MDL set statements.