Table of Contents

Example

Patch - Park fixtures 1 thru 100000

by: Sebastian Beutel, july 2020
idea: Yenz Nyholm, see https://www.facebook.com/groups/Avolites/permalink/1931175330348025/
description: Parks/unparks fixtures 1 ~ 100000

From Titan v15 on ClearAll() requires two parameters, see Programmer.Editor.ClearAll.
Simply change the relevant line(s) to Programmer.Editor.ClearAll(false, false).

functions

affected properties

The repatch menu does not actually use the PatchSelection, it has its own property Patch.Repatch.SelectedFixtureHandles.

Code

ParkFixtures1Thru100000.xml
<?xml version="1.0" encoding="utf-8" ?>
<avolites.macros>
 
<!-- 
  Sebastian Beutel, July 2020
  idea by Yenz Nyholm
  see https://www.facebook.com/groups/Avolites/permalink/1931175330348025/
-->
 
 
<macro id="Avolites.Macros.ParkFixturesOneThru100000" name="Park Fixtures 1 Thru 100000">
  <description>Parks fixtures 1 ~ 100000.</description>
  <sequence>
    <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","Channel","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",1)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","KeypadThrough","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",1)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","KeypadEnter","",0)</step>
    <step pause="0.01">Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step>
    <step pause="0.01">Handles.SetSourceHandleRangeFromHandles(Windows.PatchView.Handles, true)</step>
    <step pause="0.01">Patch.Repatch.SetDmxAddressesFromSelectedFixture()</step>
    <step pause="0.01">Patch.Repatch.ParkSelectedFixtures()</step>
    <step pause="0.01">Handles.ClearSelection()</step>
    <step pause="0.01">Programmer.Editor.ClearAll()</step>
  </sequence>
</macro> 
 
<macro id="Avolites.Macros.UnparkFixturesOneThru100000" name="Unpark Fixtures 1 Thru 100000">
  <description>Unparks fixtures 1 ~ 100000.</description>
  <sequence>
    <step pause="0.001">Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","Channel","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",1)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","KeypadThrough","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",1)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","NumericKeys","",0)</step>
    <step pause="0.001">Menu.InjectInput("OnButtonDown","KeypadEnter","",0)</step>
    <step pause="0.01">Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step>
    <step pause="0.01">Handles.SetSourceHandleRangeFromHandles(Windows.PatchView.Handles, true)</step>
    <step pause="0.01">Patch.Repatch.SetDmxAddressesFromSelectedFixture()</step>
    <step pause="0.01">Patch.Repatch.UnParkSelectedFixtures(true)</step>
    <step pause="0.01">Handles.ClearSelection()</step>
    <step pause="0.01">Programmer.Editor.ClearAll()</step>
  </sequence>
</macro>
 
</avolites.macros>

Here, the pause=“0.01” seems to be required - if there is no pause, always the previously for repatching selected fixtures will be parked, and if there aren't any an exception is thrown.

Explanation

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

The first part simply emulates fixture selection by syntax, like 1 THRO 100000:

This way the fixtures 1 ~ 100000 are selected.

The following code is taken from Patch - Park selected fixtures

How to use it