Table of Contents

Example

Patch - Invert Pan for selected fixtures

by: Sebastian Beutel, April 2018
published: see https://www.facebook.com/groups/Avolites/permalink/1226670914131807/
description: Inverts/uninverts pan for currently selected fixtures

functions

affected properties

It is important to find the correct control name, see ControlName

Code

InvertPanSelectedFixtures.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.InvertPanSelectedFixtures" name="InvertPan Selected Fixtures">
    <description>Inverts Pan for the currently selected fixtures.</description>
    <sequence>
      <step>Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step>
      <step>Programmer.Editor.Fixtures.Patch.InvertFixtureControls(Windows.PatchView.Handles, "Pan", True)</step>
    </sequence>
  </macro>
 
  <macro id="Avolites.Macros.UnInvertSelectedFixtures" name="UnInvert Pan Selected Fixtures">
    <description>Uninverts Pan the currently selected fixtures.</description>
    <sequence>
      <step>Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step>
      <step>Programmer.Editor.Fixtures.Patch.InvertFixtureControls(Windows.PatchView.Handles, "Pan", False)</step>
    </sequence>
  </macro>
 
</avolites.macros>

Explanation

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

Each macro gets the currently selected fixtures and puts these handles in the menu property “Windows.PatchView.Handles”.

All fixtures in this property are then pan-inverted resp. pan-univerted.

How to use it