Table of Contents

Example

Legend - Set a Page Legend

by: Sebastian Beutel, August 2018
published: http://forum.avolites.com/viewtopic.php?f=20&t=5854&p=21106#p21106
description: Set page names, e.g. for playback or fixture pages
remarks: Unlike with other handles, this is called a name, not a legend - and requires other functions.

functions

Code

setPageNames.xml
<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
  <macro id="sb.Macros.setPBPageName" name="Set PB Page Name">
    <sequence>
      <step>Handles.SetGroupPage("Playbacks", 0)</step>	
      <step>Handles.SetGroupPageName("Playbacks", "PbPg. 1")</step>
      <step>Handles.SetGroupPage("Playbacks", 1)</step>	
      <step>Handles.SetGroupPageName("Playbacks", "PbPg. 2")</step>
      <step>Handles.SetGroupPage("Playbacks", 2)</step>	
      <step>Handles.SetGroupPageName("Playbacks", "PbPg. 3")</step>
      <step>Handles.SetGroupPage("Playbacks", 3)</step>	
      <step>Handles.SetGroupPageName("Playbacks", "PbPg. 4")</step>
    </sequence>
  </macro>
  <macro id="sb.Macros.setFixPageName" name="Set Fixture Page Name">
    <sequence>
      <step>Handles.SetGroupPage("Fixtures", 0)</step>	
      <step>Handles.SetGroupPageName("Fixtures", "Generics")</step>
      <step>Handles.SetGroupPage("Fixtures", 1)</step>	
      <step>Handles.SetGroupPageName("Fixtures", "Spots")</step>
      <step>Handles.SetGroupPage("Fixtures", 2)</step>	
      <step>Handles.SetGroupPageName("Fixtures", "Washes")</step>
      <step>Handles.SetGroupPage("Fixtures", 3)</step>	
      <step>Handles.SetGroupPageName("Fixtures", "LED Wall")</step>
    </sequence>
  </macro>
</avolites.macros>

When using characters outside the ASCII character table as name the results may vary:

  1. in order to get an ampersand ( the & character) you must write it as entity (&amp;): Handles.SetGroupPageName(“Colours”, “Greens &amp; Blues”)
  2. german Umlauts (ä, ö, ü, ß and the like) work normally (entities would throw errors): Handles.SetGroupPageName(“Colours”, “Grün”)
  3. you can even display UTF-16 characters by using the HTML code notation, e.g. for the Yuan character 元: Handles.SetGroupPageName(“Playbacks”, “&#20803;”)

Explanation

This explains the functional steps within the sequence. For all the other XML details please refer to Formats and syntax

Each page legend is set with two steps:

How to use it