Example
by: | Gregory Haynes, Nov. 2017 |
---|---|
published: | http://forum.avolites.com/viewtopic.php?f=20&t=5408 |
description: | Freezes/Unfreezes the selected fixtures |
remarks: | silently shows the use of IEnumerable |
<?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.FreezeSelectedFixtures" name="Freeze Selected Fixtures"> <description>Freezes the currently selected fixtures.</description> <sequence> <step>Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step> <step>Programmer.Editor.Fixtures.Patch.FreezeFixtures(Windows.PatchView.Handles, True)</step> </sequence> </macro> <macro id="Avolites.Macros.UnfreezeSelectedFixtures" name="Unfreeze Selected Fixtures"> <description>Unfreezes the currently selected fixtures.</description> <sequence> <step>Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")</step> <step>Programmer.Editor.Fixtures.Patch.FreezeFixtures(Windows.PatchView.Handles, False)</step> </sequence> </macro> </avolites.macros>
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 frozen resp. unfrozen.