Table of Contents

Example

Patch - Park selected fixtures

by: Gregory Haynes, August 2019
published: see http://forum.avolites.com/viewtopic.php?f=20&t=6207&p=22282
description: Parks the currently selected fixtures

functions

affected properties

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

Code

ParkSelectedFixtures.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="Avolites.Macros.ParkSelectedFixtures" name="Park Selected Fixtures">
    <description>Parks the currently selected fixtures.</description>
    <sequence>
      <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>
    </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

How to use it