Viz Pilot User Guide

Version 8.0 | Published May 30, 2017 ©

Execution Logic Editor

Execution Logic commands are saved as part of a template. This allows data elements based on the template to use the same execution logic commands.

For example, adding an execution logic script to the Media Sequencer command Take, will replace the Take command for all data elements based on that template.

A benefit of using Execution Logic is that the script can be run without the need for Director to be open. It is possible to utilize a limited set of commands - or any Viz Engine command - straight on the Media Sequencer to issue instructions or emulate button presses for each created Data Element.

This section contains the following topics:

  • Execution Logic Editor

  • Working with Execution Logic

Execution Logic Editor

This section contains the following topics:

  • Execution Logic Editor Features

  • To enable the execution logic editor

  • To add execution logic to a template

Execution Logic Editor Features


The Execution Logic editor consists of three panes; a list of commands, a command editor and a list-view displaying syntax errors. In addition the editor has a search feature.

  • Command list: Displays the available commands. Available context menu options are Clear selected command and Clear all commands.

    • Clear selected command: Clears the execution logic for the selected command.

    • Clear all commands: Clears all execution logic for all commands.

  • Command editor: Displays the currently selected command and its execution logic. Available context menu options are Insert default action and Find.

    • Insert default action: Inserts the default command <ref>/logic/element/run</ref>.

    • Find (CTRL+F): Opens the Find tool.

  • Syntax error list: Displays any syntax errors in any of the commands. It is not possible to close the window with changes to any command before all syntax errors are resolved.

  • Find (CTRL+F): Searches the currently open command’s execution logic.

  • OK: Save changes and close the execution logic editor.

    IMPORTANT! If the Execution Logic Editor is closed using the Exit button or by selecting File then Close, then any changes will NOT be saved. In addition, if the template is saved and closed without first saving the execution logic, the execution logic will not be updated in the template.

  • Cancel: Close without saving.

  • XML tags suggestion dropdown: Type < to open the suggestion dropdown.


To enable the execution logic editor

  • Go to View > Execution Logic Editor

To add execution logic to a template

  1. Open the Execution Logic Editor.

  2. Click on one of the existing commands (left pane)

  3. Add the logic in the editor (right pane) and click OK.
    For more information on how to create execution logic, see the Media Sequencer manual on how to use the Media Sequencer’s logic building blocks.

Working with Execution Logic

This section contains the following topics:

  • Send basic commands

  • Example - Play, Continue, Take Out

  • Example - Forked Execution

  • Example - Commands generated by a template

Send basic commands

The <viz> handler is used to send commands to the Viz Engine.

The following example sends the RENDERER SET_OBJECT SCENE*... command to channel “A” in the current profile:

<env viz="A">

Multiple commands can be sent by separating each command with <br/>, for example:


Instead of setting the command directly, a more powerful approach is to use the contents of a field in the template. The field (a hidden textbox for instance) can then be filled with the Viz commands that need to be sent.

This example shows how the contents of a data field in a data element can be retrieved by using the <ref> construct ("field_01" is the ControlObjectName of the data field):

<env viz="A">

To send commands to several channels, duplicate the command:

<env viz="A">
<env viz="B">

Note: Forked execution is required when a channel contains multiple engines, otherwise the commands will only apply to the first engine in a channel.

Note: Execution logic will not work with non-control object based templates.

Example - Play, Continue, Take Out

This example shows how execution logic can be used to play an element, do a Continue after five (5) seconds, and then a Take Out after ten (10) seconds.

In the Execution Logic Editor, select the “take” command. Add the logic into the editor (right pane). This means that when a “take” is issued on a data element based on this template, the Media Sequencer will execute the logic.

The commands are modified to do a "take","continue" and then an "out". The timecode for each operation must be set.

<env command="take" timecode="00:00:00:00">
<env command="continue" timecode="00:00:05:00">
<env command="out" timecode="00:00:10:00">

Note: The running/outer context takes precedence over attributes on the “ref”. Instead of adding attributes on the “ref” node, you use an “env” node as in the example above.

Example - Forked Execution

These examples show how the "take" command can be modified to make the template override the standard logic and instead send RENDERER*STAGE START.

Here the command will be sent to the channel assigned to the data element:

<entry name="execution_group"><var>channel</var></entry>

To send commands to a specific channel in the current profile, replace <var>channel</var> with the name of the channel you want to send to, as follows:

<entry name="execution_group">MY_CHANNEL</entry>

Example - Commands generated by a template

By using the information from the preceding examples, we can create logic that will send custom Viz commands that are generated by the template.

One way would be to add a Value Control Component to the template, and set the ControlObjectName to "vizcmds". Then create a regular script that sets the ControlValue of the TWValueControl to whatever command needs to be sent.

Alternatively, use a standard memo box, and set the ControlObjectName to "vizcmds". Then enter the Viz commands (or script what the contents should be). The memo box’s visibility can be set to false so the user can’t see it. In the Execution Logic you can then add the following:

<entry name="execution_group"><var>channel</var></entry>