Switch

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.

Note: The following properties are available when the Switch element is selected in the flowchart.
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.

Note: The following properties are available when one of the branches that leads from the Switch element to the corresponding geometry is selected in the flowchart.
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:

Entering anything else in this cell results in the Default case, which is an X.

Note: When an input parameter string is used to define a switch option, the input parameter string is case sensitive. For example, if a switch case is defined as "Square", entering "square" as the input parameter value will return the default case.

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.