Charles Vance Certified Archestra Developer and Freelance Programmer

Tutorial Complexity

How To Use Archestra Template Toolbox

Published August 11, 2019 in Uncategorized - 0 Comments

How To Use Archestra Template Toolbox

The Template Toolbox allows you to manage template structures with ease.  The goal of System Platform is to allow modeling of object structure after the process, machine or device. In this example I’m going to keep it simple so let’s take a look at how we can model a valve as a template structure.

A typical motorized valve like the one pictured here can be commanded to open or close with switch feedback to tell you if the valve has completed its travel to either limit.

One possibility for object structure in the Archestra galaxy to accommodate this model would be to create a container object for the valve itself then create individual objects for command output and switch feedback as shown below.

While the advantage of this method of representation is a clearly defined structure the presence of hundreds of these objects presents problems of maintaining and creation of new structures that can be time consuming or error prone. 

This is where using the Template Toolbox to manage the structure becomes invaluable. The structure can easily be created inside a template tool set as shown below to create a template structure that can be maintained as a group. To create a new instance all that is required it right clicking the $Valve template and selecting “Create New Instance”.

When the new instance of the $Valve template is created it is created as a group, each template and sub template has a new instance created in the correct order.

In the derivation view we see that each of the sub templates assigned to $Valve master template are now represented as a dotfield such that $Valve.ClosedCmd, $Valve.ClosedSW, $Valve.OpenCmd, and $ValveOpenSW become elements of the master template.

As each new instance of the master $Valve template are created each of the sub element instances are also added. In this way each sub template can be located quickly from the galaxy derivation view by right clicking the template and selecting “Synchronize Views”.

Synchronize view only works between the Template Toolbox view and the Derivation view.

Once the view has been synchronized simply change to the  deployment view tab to see the total object structure as it exists on the target platform.

For a short video tutorial of how this all works click here.

To take my Free basic Archestra training course click here.

Step-by-Step Archestra Scripting Guide

Subscribe now to receive FREE Tutorials and Scripting Examples

We will never share or sell your email address.

Powered by ConvertKit

No comments yet

Leave a Reply: