Viz Pilot User Guide

Version 8.0 | Published May 30, 2017 ©

Update Script Editor

eThis editor allows you to add scripts that will be executed by update services on the server side, and not on the client side through Director.

Unlike the Live Update mechanism that relies on Director executing the scripts, update services work on the Media Sequencer alone, and are therefore available to all products connected to the Media Sequencer.

The update script does not have access to components in the template, only the data, so the template does not need to be loaded by Director (as is the case for Live Update scripts).

This section contains the following topics:

  • Using the Update Script Editor

  • Update Services

  • Update Service Scripting

  • Viz Data Format (VDF)

Using the Update Script Editor

The Update Script Editor consists of the Script and Actions tabs.



The Script tab allows you to select which of the Update Services you want to use. Either Viz Pilot system’s own Update Service or an external (third party) update service.



The Actions tab allows you to select which actions should be triggered during an update and set the timeout for each action.

Script actions are based on Read, Take, Cue and Update events that are triggered on the Media Sequencer.

When the Take action is selected, the Update at regular intervals while on air option is enabled. If this is checked, then the Media Sequencer will periodically send updates to the update service. The interval is specified by the parameter live_update_interval, and the minimum value is 2 seconds.

Note: The functionality to Update at Regular Intervals is only available if Template Wizard is connected to a database with schema Viz Pilot 6.0 or later, and Media Sequencer 3.0 or later.

Update Services

Update services are mechanisms that let the template designer decide when to update data in the template, and also which fields to update. This is useful for data that should be updated right before going on air. Typical examples are stock values, player statistics etc.


In Template Wizard you have two options:

  1. Viz Pilot’s Update Service (Script Runner): Using this mechanism means that you can write a script updating the data that will be run by Script Runner during playout.

  2. External update service: Alternatively you can point the template (no script) to an external update service (e.g. third party), that can return updated data using the Viz Data Format (VDF). In order to implement an external update service, you need to parse and return a VDF document to the Media Sequencer. The document is posted to the external update service by the Media Sequencer.


Update Service Scripting

The entry point for using Viz Pilot’s update service (Script Runner) is a method called OnUpdatePayload. The method has the following signature: Sub OnUpdatePayload(Data).

The Data parameter contains the incoming data and the data can be modified in the OnUpdatePayload script.

Properties and methods

Data Properties



Number of fields in the Data.


Returns a PayloadField at the given index.


Returns the PayloadField with the given name. "1" in this example.

PayloadField properties



The name of the field.


The name of the field.


A sample script that updates all the incoming fields and set their values to “New value from script”:

Sub OnUpdatePayload(Data)
For i=0 to Data.Count-1
Set field = Data.FieldAt(i)
field.Value = "New value from script"
End Sub

Tip: Data treated outside the OnUpdatePayload function (e.g. fetching external data from files or databases) must be returned before the OnUpdatePayload function ends.

Viz Data Format (VDF)

Viz Data Format (VDF) refers to format specifications created for the purpose of data interchange between Vizrt software components. They form the basis of integration points, interoperability, reusable components and content portability.

The Viz Data Format (VDF) Payload and Model Specification can be accessed through the Pilot Data Server’s Documentation page.

Example VDF:

<?xml version="1.0" encoding="utf-8"?>
<payload model="http://localhost:8177/templates/18110/model" xmlns="">
<field name="-concept-variant-choice">
<field name="concept">
<field name="variant">
<field name="1">
<field name="2">
<value>rocks :)</value>