Switch
Specify up to 11 geometry options, the application of which depends on the result of a specified expression.
A switch condition can use either strings or enumeration.
Switch Properties
Specify the following parameters in the Properties panel.
Miscellaneous | |
Expression | Defines the expression that defines the geometry. Click [...] to open the Expression Editor, where you can enter or calculate a value. |
Branch Properties
Specify the following parameters in the Properties panel.

Miscellaneous | |
Case | Specifies the expression or Enumeration Item that specifies the geometry. |
Is Default Case | Specifies whether the case is used if no case, or an invalid case, is selected. |
Example: Strings
To see an example of how this geometry element is used, open the following Sample PKT file:
Switch Example.pkt
In this example, there is a series of points around the perimeter of the origin. In the Input/Output Parameters tab, the Shape parameter determines the geometry that is drawn. Entering any of the following strings results in a shape:
- Square
- Triangle
- Circle
Entering anything else in this cell results in the Default case, which is an X.

Example: Enumeration
To see an example of how this geometry element is used, open the following Sample PKT file:
Enumeration Example.pkt
The example PKT contains a subassembly that represents a barrier.
- In the Input/Output Parameters tab, the Barrier parameter uses an enumeration group (BarrierType).
- The subassembly contains a
Switch that enables selection between four standard barrier types. The barrier types are controlled by the Default Value in the BarrierType parameter.
- Each of the four
sequences use variable values to define the parameter values for each barrier type.
- The Geometry sequence contains the points, links, and shape that make up the geometry. The geometry for each of these points refers to the variables that are defined in the Height and Width Variables sequence.
