Conditional routing lets you attach an expression to a source or to an individual input switch that decides whether a route runs. Before a route executes, Space CE evaluates the expression against the current routing context. If it evaluates to true (or is empty), the route proceeds. If it evaluates to false, that route is blocked.
Conditional routing is not a separate configuration section. A Condition is a string field on an AV Source object and on each Input Switch object. There is no dedicated conditional-routing section to enable.
Condition string. Conditions on destination groups are currently not supported.When to use each
A condition on an AV Source
A Condition on an AV Source affects every route for that source. If it evaluates to false for a given destination type, destination, or output switch, the source is not routed there.
Example: a left-hand PC source that routes everywhere except the lecture-capture and breakaway-audio destinations. (Breakaway audio is an audio-only output that follows a different source from the video, e.g. sending a microphone mix to a recorder while video goes to the displays.)
A condition on an Input Switch
A Condition on an Input Switch applies only to that switch. This is useful for controlling non-standard switch actions, such as a preset recall (recalling a stored device preset) or a stream set (selecting a stream), so they only fire in the right context.
Example: when a PTZ camera (a pan/tilt/zoom camera) routes to a Main destination type, a preset recall fires alongside the video route. For other destination types, only the video routes.
Condition context identifiers
An expression can reference the identifiers below. If one of them doesn’t apply to the current route, it takes the placeholder value any, and any comparison against any is treated as true — so a route is never blocked just because a piece of context wasn’t set. A condition only blocks a route when a known value genuinely fails the check.
| Identifier | Meaning |
|---|---|
DestinationType | The Type of the destination being routed to (matches the destination’s Type field, e.g. Main Display, Preview). |
DestinationId | The ID of the destination being routed to. |
OutputSwitchId | The ID of the output switch involved in the route. |
DestinationType against the exact Type string ("Main Display"), and compare DestinationId / OutputSwitchId against the exact ID values you defined.Supported operators
The expression language supports only the following. There are no relational operators (<, >, >=, <=), no arithmetic, and no true / false keyword.
| Operator | Type | Description |
|---|---|---|
== | Equality | True if two strings are equal. Both operands must be strings. |
!= | Inequality | True if two strings differ. Both operands must be strings. |
&& | Logical AND | True when both boolean operands are true. |
|| | Logical OR | True when either boolean operand is true. |
! | Logical NOT | Negates a boolean operand. |
() | Parentheses | Groups expressions and controls evaluation order. |
Additional rules:
- Values are either a context identifier (such as
DestinationId) or a double-quoted string literal (such as"hdmi.capture"). ==and!=require string operands on both sides.&&,||, and!require boolean operands (i.e. the results of comparisons).- Precedence from lowest to highest is:
||, then&&, then!, then the comparison operators. Use parentheses to make grouping explicit.
Worked condition expressions
Block a source from two named destinations. Prevent a PC source from routing to the lecture-capture and breakaway-audio destinations, while allowing every other destination:
{
"ID": "source.pc.left",
"Label": "Left PC",
"Type": "PC",
"Condition": "(DestinationId != \"hdmi.capture\") && (DestinationId != \"breakaway.audio\")"
}
Recall a DSP preset only for non-preview destinations. Put this on the input switch that performs the preset recall, so it fires everywhere except preview monitors:
{
"ID": "pc.dsp.preset",
"Switcher ID": "dsp-1",
"Type": "Preset Recall",
"Value": "room:preset:present",
"Condition": "DestinationType != \"Preview\""
}
Restrict a switch to a single destination type. Fire a camera preset recall only when routing to a Main display, useful when a source has multiple input switches competing on the same matrix:
{
"ID": "ptz.preset.main",
"Switcher ID": "camera-1",
"Type": "Preset Recall",
"Value": "preset.presenter",
"Condition": "DestinationType == \"Main Display\""
}