Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

route

  • Last UpdatedJan 18, 2024
  • 2 minute read

The route command connects an internal field (internal variable or node field) to another internal field.

When an event is raised by the source field (in other words, the field value is overwritten) its value is copied to the target field.

You can use conditional clauses and force values to create special behaviors.

Modifier

Behavior

condition

Use the conditional clause to restrict routing to certain conditions. The clause is evaluated every time the source field triggers an event.

value

Use the force value to copy another value into the target field that is not the value of the source field. This value can reference another field.

Platform support

This element is fully supported on XR-Windows, XR-Portable Windows, XR-Portable iOS, XR-Portable Android, and XR-P WASM platforms.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Code example

This is a code example for the route element.

<route from="joy0.povDDown" to="dpi_d.execute" condition="@global.currentContext@==set_dpi^@dpiko.visible@==false" value="pressed"/>

Position

The route element must be inside a context node, such as Context or Global.

Fields

These are the fields for route command.

Fields

Type

Use

Default value

Description

condition

sstring

Optional

Not set

Restricts the routing behavior. The content can be:

  • An SBOOL constant, such as true or false.

  • An SBOOL field reference.

  • A conditional operation with supported conditional operators.

from

sstring

Mandatory

Not set

The name of the source external variable.

resolve

sbool

Optional

true

If set to false, the value content will be treated as a literal string.

to

sstring

Mandatory

Not set

The name of the target internal field. This could be an internal variable or node field.

value

sstring

Optional

Not set

Forces routing to copy a value different from the source field one.

In This Topic
TitleResults for “How to create a CRG?”Also Available in