Use model.component(<ctag>).geom(<tag>).create(<ftag>,<type>) to add an If, ElseIf, Else, or EndIf feature after the current feature.
Use model.component(<ctag>).geom(<tag>).feature().createAfter(<ftag>,<type>,<postag>) to add an If, ElseIf, Else, or EndIf feature after the feature tagged
<postag>.