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

AVEVA™ XR Studio

Adapting Mwx content for instancing

  • Last UpdatedMay 21, 2025
  • 1 minute read

In order to enable an item of MWX content to become instantiable, there are few actions to take.

Editing the MWX file

Two elements must be manually modified for each mesh that you want to make instantiable.

  1. Name of the mesh should contain a placeholder name tag (usually T_NAME) in its name and anywhere else that you need to set the template instance name.

  2. The geometry needs to be marked as referenceable (isRef="true").

Example

This example shows the two modified elements.

<Mesh type="Unified" name="monitor|monitor_T_NAME" version="1">

<transform scale="1.0 1.0 1.0"

rotation="-0.0 -0.0 -0.0 1.0"

translation="0.0 -0.0 0.0"/>

<material>

<Material type="DX11" version="1.1">

<pass name="standard" shader="EngineLib|shTxt|unlit_opacity">

<param type="unknown" name="mDiffuseMap" value="monitor_default.tga"/>

<state name="blendMode" value="alphaBlending"/>

</pass>

</Material>

</material>

<geometry>

<Geometry name="monitor|monitor" isRef="true" file="monitor\monitor_monitor.geom" version="1"/>

</geometry>

<obbox center="0.0 0.00005 0.0"

hsize="0.5 0.00005 0.5"

uaxis="1.0 0.0 0.0"

vaxis="0.0 1.0 0.0"

waxis="0.0 0.0 1.0"/>

<sphere center="0.0 0.00005 0.0" radius="0.707107"/>

</Mesh>

Using replace function on node creation

The node creation statement for mwx node must use the replace function to bind the name placeholder tag used in the mwx file with the name to be used (usually the template instance name %T_NAME%).

<createnode name="mwx_%T_NAME%" type="Mwx" file="user\monitor.mwx" replace="T_NAME=%T_NAME%"/>

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