OpenDX - Documentation
Full Contents QuickStart Guide User's Guide User's Reference
Previous Page Next Page Table of Contents Partial Table of Contents Index Search

Switch

Category

Flow Control

Function

Selects one input from a list.

Syntax

output = Switch(selector, input, ...);

Inputs
Name Type Default Description
selector integer 0 object to be selected
input value list, string list, or object no default selectable object
...     more objects to be switched

Outputs
Name Type Description
output object the object switched

Functional Details

This module selects a specified object from input and passes it through to output.

selector

specifies which of the n input objects are to be passed to output. If the specified value is 1, the first input object (the second input to the module itself) is passed through; if the specified value is 2, the second input object (the third input to the module) is passed through; and so on.

If the specified value is <= 0 or larger than n, output is NULL.

input

specifies an input that may or may not be passed to output.

A single Switch module can accept a maximum of 21 input objects. In the user interface, the default number of enabled tabs is two. (Tabs can be added to the module icon and removed with the appropriate ...Input Tab options in the Edit pull-down menu of the VPE.)

Note: In the user interface you may find it helpful to use the first output of the Selector interactor as the first input (selector) to Switch. See "Selector and SelectorList Interactors" in IBM Visualization Data Explorer User's Guide for more information.

Components

All input components are propagated to the output.

Example Visual Programs

AlternateVisualizations.net
ConnectingScatteredPoints.net
UsingSwitchAndRoute.net
SIMPLE/Switch.net

See Also

 Collect,  Route

 Chapter 4. "Data Explorer Execution Model" in IBM Visualization Data Explorer User's Guide.


Full Contents QuickStart Guide User's Guide User's Reference

[ OpenDX Home at IBM | OpenDX.org ]