Model Schema Wizard
The Model Schema allows to create a custom data structure for the model.
To assist with the definition of the Model Schem and ensure that the JSON Object is correctly formatted, the DT Model Management Tool provides a Model Schema Wizard.
Access the Model Schema Wizard
Notes:
To access the Model Schema Wizard it is required that:
- A Model Type is selected
- A Model Name is defined
Select the respective cell in Column Model Schema for the Model you want to define the Model Schema for.
If all conditions are met, the Model Schema Wizard button is shown in the Help section of the LitmusConfiguration ribbon.

Open the Model Schema Wizard by pressing the Model Schema Wizard button.

The Model Schema wizard will show.

Notes:
If the Model has already a Model Schema defined, it will be shown in the Schema Builder Tree.

Schema creation
The Model Schema Wizard allows users to create a custom data structure for their Model.
A Digital Twin Model Schema is represented as a Tree.

The tree consist of three different types of building blocks:
- Nodes: shown as an orange leave of the tree with its name
- Node Arrays: shown as an orange leave of the tree with a "[]" before the name
Are the banches of the tree but can also be understood as folders for
- Items: shown as green leaves which represent the different attributes, both static and dynamic
Which are the leaves of the tree but can also be understood as files inside a folder.
Managing Nodes and Node Arrays
Nodes and Node Arrays act as branches for the tree and are used to create the layerd hierarchy of the data structure.
Adding Nodes or Node Arrays
To add a new Node, open the Context menu by performing a right Click with your RMB on any Node or Node Array and move to either the Add Node or Add Node Array option.

Provide a unique Name for the Node or Node Array.

To add the Node or Node Array, press the ENTER key on your keyboard.

Rename Nodes or Node Arrays
To rename a Node or Node Array, open the Context menu by performing a right Click with your RMB on any Node or Node Array and select the Rename Node option.

Provide a unique Name for the Node or Node Array.

To rename the Node or Node Array, press the ENTER key on your keyboard.

Removing Nodes or Node Arrays
To remove a Node or Node Array, open the Context menu by performing a right Click with your RMB on any Node or Node Array and click the Remove Node option.

This will remove the Node or Node Array.

Important: This will also remove all of its Child brances like Nodes, Node Arrays and Items as leaves.
Managing Items
Items act as leaves for the tree and represent the data which the data structure delivers.
Adding Items
To add a new Item, open the Context menu by performing a right Click with your RMB on any Node or Node Array and move to either the Add Static Attribute Item or Add Dynamic Attribute Item option.

Select the Static Attribute or Dynamic Attribute from the drop down you want to add to the Node or Node Array.

This will add the Item under the Node or Node Array.

Removing Items
To remove an Item, open the Context menu by performing a right Click with your RMB on any Item and click the Remove Attribute option.

This will remove the Item from the Node or Node Array.

Sync Attributes
To sync the existing schema, click the Sync Attributes icon.

The wizard will request Confirmation.

If you wish to proceed, then click Yes.
All attributes will be appended to the current hierarchy. If they exist, the static_attributes and dynamic_attributes nodes will be recreated.

Clear Schema
To clear the schema builder tree, click the Clear Schema icon.

Saving the Model Schema
To save the Data Structure as a new Model Schema JSON Object, press the Save button.

This will create the correctly formatted Model Schema JSON Object and store it in column Model Schema for the Model.

Important: This will overwrite the current value in column Model Schema.
Cancel the Model Schema Wizard
If a user decides to not save the current data strucutre defined in the Model Schema Wizard, they can press the Cancel button.

Notes:
This will not overwrite the current value in column Model Schema.
Additional Options for managing Nodes, Node Arrays and Items
Move a Node or Node Array
To move an existing Node or Node Array together with all of its Child brances like Nodes, Node Arrays and Items as leaves withhin the data structure Hierarchy, open the Context menu by performing a right Click with your RMB on any Node or Node Array and select the Move Node option.

This will change the color of the Node or Node Array to gray.

Now open the Context menu by performing a right Click with your RMB on the Node or Node Array where you want to move the gray Node or Node Array under and select the Paste Node or Item option.

The Node or Node Array is moved under the new location.

Copy a Node or Node Array
To create a copy of an existing Node or Node Array together with all of its Child brances like Nodes, Node Arrays and Items as leaves withhin the data structure Hierarchy, open the Context menu by performing a right Click with your RMB on any Node or Node Array and select the Copy Node option.

This will change the color of the Node or Node Array to magenta.

Now open the Context menu by performing a right Click with your RMB on the Node or Node Array where you want to create a copy of the magenta Node or Node Array under and select the Paste Node or Item option.

A copy of the Node or Node Array is created under the new location and the Suffix "_copy" added to its name as names need to be unique.

Move an Item
To move an existing Item withhin the data structure Hierarchy, open the Context menu by performing a right Click with your RMB on any Node or Node Array and select the Move Item option.

This will change the color of the Item to gray.

Now open the Context menu by performing a right Click with your RMB on the Node or Node Array where you want to move the gray Item to and select the Paste Node or Item option.

The Item is moved under the new location.

Copy an Item
To create a copy of an existing Item withhin the data structure Hierarchy, open the Context menu by performing a right Click with your RMB on any Item and select the Copy Item option.

This will change the color of the Item to magenta.

Now open the Context menu by performing a right Click with your RMB on the Node or Node Array where you want to create a copy of the magenta Item under and select the Paste Node or Item option.

A copy of the Item is created under the new location.

Unfold a Node or Node Array
To unfold a Node or Node Array when it is folded, click the downwards pointing chevron.

This will unfold the respective Node.

Fold a Node or Node Array
To fold a Node or Node Array when it is unfolded, click the right pointing chevron.

This will fold the respective Node.

Notes:
By default the Model Schema is shown unfolded