How to let field operator inspect an item
- Last UpdatedJan 24, 2023
- 1 minute read
You can trigger the activation of inspecting in several ways based on: actions, sensor, commands driven by the XR Instructor.
This topic explains how to implement the most common method, which is creating an inspect action.
To create an inspect action
-
Add an inspect user action to the inspectable item.
-
Configure the action\inspect parameters (hotkey, text).
-
Create a route from the inspect action to the inspect state. This is usually done in the Graphic Context logic file.
Code example
In the first line of this example, the route says that whenever the inspect action is started on the inspectable item, its inspect state must be inverted. Therefore, with the same action you can open and close inspection.
<!-- binding inspection to inspect action -->
<route from="itemName.action\inspect\state" to="itemName.inspect" condition="@itemName.action\inspect\state==started" value="[?!@itemName.inspect@]" />
<!-- binding inspect state to other -->
<route from="itemName.inspect" to="sound.start" condition="@itemName.inspect@" />
<route from="itemName.inspect" to="sound.stop" condition="!@itemName.inspect@" />
<route from="itemName.inspect" to="meshName.visible" />