*if()

Indicates the beginning of an *if() block.

Syntax

*if(condition)

Arguments

condition
Any valid expression that evaluates to a numeric value.

Example

*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, 
                                            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

Both Topology and Property (Set) statements can be used within an *if()/*elseif()/*else()/*endif() block.*if() blocks can be constructed that use *elseif() or *else(). These statements are optional.

The *endif() statement is required even if the *elseif() or *else() statements are not included.