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 | {{tag>invert uninvert selected controlname}} ==== functions ==== * [[:macros:function:Programmer.Editor.Selection.GetSelectedHandles]] * [[:macros:function:Programmer.Editor.Fixtures.Patch.InvertFixtureControls]] ==== affected properties ==== * [[:macros:property:Windows.PatchView.Handles]] It is important to find the correct control name, see [[macros:identifier:controlname]] ===== Code ===== Inverts Pan for the currently selected fixtures. Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles") Programmer.Editor.Fixtures.Patch.InvertFixtureControls(Windows.PatchView.Handles, "Pan", True) Uninverts Pan the currently selected fixtures. Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles") Programmer.Editor.Fixtures.Patch.InvertFixtureControls(Windows.PatchView.Handles, "Pan", False) ===== Explanation ===== This explains the functional steps within the sequence. For all the other XML details please refer to [[:macros:formats_and_syntax#xml_format|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 ===== * [[:macros:deploying|make this macro available]] * When needed, select some fixtures and apply this macro in order to invert pan for these fixtures. ~~DISCUSSION~~