Example ====== Patch - Freeze selected fixtures ====== ^ 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 [[macros:type:ienumerable]] | {{tag>freeze unfreeze selected fixture}} ==== functions ==== * [[:macros:function:Programmer.Editor.Selection.GetSelectedHandles]] * [[:macros:function:Programmer.Editor.Fixtures.Patch.FreezeFixtures]] ==== affected properties ==== * [[:macros:property:Windows.PatchView.Handles]] ===== Code ===== Freezes the currently selected fixtures. Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles") Programmer.Editor.Fixtures.Patch.FreezeFixtures(Windows.PatchView.Handles, True) Unfreezes the currently selected fixtures. Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles") Programmer.Editor.Fixtures.Patch.FreezeFixtures(Windows.PatchView.Handles, 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 frozen resp. unfrozen. ===== How to use it ===== * [[:macros:deploying|make this macro available]] * selecting some fixtures and firing one of the macros freezes/unfreezes the selected fixtures ~~DISCUSSION~~