InteractionViewer
- Last UpdatedDec 16, 2023
- 4 minute read
This topic is part of Specialized 2D Nodes.
InteractionViewer node
The InteractionViewer is a 2D interface that presents the formatted value of the currently selected item. It works together with an instance of InteractionSelector.

Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Code Example
This is a code example for the InteractionViewer node.
<InteractionViewer name="interactionviewer" position="1398 724" size="256 128" selectorNode="sel" order="20" />
Grouped items
The Interaction Viewer supports grouped item display.
-
The displayed content is characterized by a title (item name or group name) and a list of properties.
-
Each property belongs to a single item of a group.
-
Ungrouped items show only one property.
-
Grouped items can show 1 to n where n is the number of items of the group.
How grouping works
See Item for more information about how grouping works.
-
The first line of a property shows the property description and is linked to the item displayName value.
-
The second line shows the property status and is linked to the item displayValue.
-
The InteractionViewer can show until maxLines display.
-
There are up to maxLines additional spare lines that can display a multi-line displayValue.
-
The spare lines are not per single item, but shared among all the items of a group. A single item can consume all the spare lines or they can be distributed among the items of a group.
-
The InteractionSelector displays selection of an item (or a group of items) when the viewer visible attribute is true.
To use the spare lines
-
Enter a carriage return code ('\\n') into a displayValue text field.
Examples of display values
The following table shows current displayValue defined for various items.
|
Item |
displayValue |
|---|---|
|
ItemGauge |
[*'{0:0.00}',n:@name.value@] |
|
ItemGaugeDisplay |
[*'{0:0.00}',n:@name.value@] |
|
ItemLevelDisplay |
[*'{0:0.00}',n:@name.value@] |
|
ItemPushButton |
[?@name.value@==0,released,pressed] |
|
ItemStateDisplay |
@name.value@ |
|
ItemAlarm |
@name.lampState@ |
|
ItemKnobSelector |
@name.value@ |
|
ItemTextDisplay |
@name.value@ |
|
ItemTrendPopup |
@name.value@ |
|
ItemPanelPopup |
@name.value@ |
|
ItemValve |
"[*'{0:P0}',n:@name.value@] |
InteractionViewer fields
These are the fields for InteractionViewer node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > InteractionViewer
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
backgroundImage |
sstring |
Optional |
Not set |
Name of the image to use as background. If the image size differs from size defined in the size parameter, the image is stretched. |
|
line1Area |
svec4 |
Optional |
0 0 256 64 |
Text area for the item name. |
|
line1Color |
svec3 |
Optional |
1 1 1 |
Text color for text line. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
line1Font |
sstring |
Optional |
Arial,Regular,20 |
The font to use for item display name. The font name must be a system font, only Bold and Regular parameters are accepted. |
|
line2Area |
svec4 |
Optional |
0 0 256 64 |
Text area for the item value. |
|
line2Color |
svec3 |
Optional |
1 1 1 |
Text color for text line. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
line2Font |
sstring |
Optional |
Arial,Bold,22 |
The font to use for item value. The font name must be a system font, only Bold and Regular parameters are accepted. |
|
maxLines |
sint |
Optional |
5 |
This value sets both maximum number of items displayed and available spare lines. |
|
order |
sint |
Optional |
100 |
The node z order that defines the display order of different children. The range is 0-255. |
|
position |
svec2 |
Optional |
0 0 |
Position of the viewer, in reference to the screen top left corner. This position refers to the achievement at the end of the appearing animation. |
|
selectorNode |
sstring |
Mandatory |
Not set |
The name of the InteractionSelector node to work with. |
|
size |
svec2 |
Optional |
256 128 |
Size of the InteractionViewer. |
|
titleColor |
svec3 |
Optional |
0.8 0.8 0.1 |
Text color for title line. The color is expressed in normalized (0-1) RGB (0 0 0 for black, 1 1 1 for white). |
|
titleFont |
sstring |
Optional |
Arial,Bold,22 |
The font to use for item name or group by name. The font name must be a system font. Only Bold and Regular parameters are accepted. |
|
visible |
sbool |
Optional |
true |
Set to false to hide interactionViewer independently from InteractionSelector. |