You can incorporate condition branching in your Shape Scripts, using either the IfElse statement or query methods that evaluate to True or False.
When you use these conditional branching statements, you can use the return command to terminate execution of the script when a branch condition has been satisfied. The Example Scripts topic provides several examples of this, such as the Return Statement Shape script.
|•||Syntax Grammar for IfElse statement syntax|
|•||Query Methods for methods that can be used as the conditional expression for IfElse statements|
|•||Example Scripts for an example of the use of conditional branching ()|