Example ====== Patch - Repatch Selected Fixtures ====== ^ by: | Sebastian Beutel, help by Gregory Haynes | ^ published: | here - April 2025 | ^ description: | repatch selected fixtures to another DMX address | ^ remarks: | idea by Daniel Dai | {{tag>Patch Repatch Fixtures}} ==== functions ==== * [[:macros:function:Programmer.Editor.Selection.GetSelectedHandles]] * [[:macros:function:Handles.SetSourceHandleRangeFromHandles]] * [[:macros:function:Patch.Repatch.SetDmxAddressesFromSelectedFixture]] * [[:macros:function:Patch.SetCurrentDmxAssignment]] * [[:macros:function:ActionScript.SetProperty.Enum]] * [[:macros:function:Patch.Repatch.RepatchSelectedFixtures]] * [[:macros:function:Handles.ClearSelection]] * [[:macros:function:Programmer.Editor.ClearAll]] ==== affected properties ==== * [[:macros:property:Windows.PatchView.Handles]] * [[:macros:property:Patch.Repatch.BunchUp]] * [[:macros:property:Patch.CurrentDmxAssignment]] (set inherently) ===== Code ===== Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles") Handles.SetSourceHandleRangeFromHandles(Windows.PatchView.Handles, true) Patch.Repatch.SetDmxAddressesFromSelectedFixture() Patch.SetCurrentDmxAssignment(42.1) ActionScript.SetProperty.Enum("Patch.Repatch.BunchUp", "BunchUp") Patch.Repatch.RepatchSelectedFixtures(true) Handles.ClearSelection() Programmer.Editor.ClearAll(false, 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]] * ''Programmer.Editor.Selection.GetSelectedHandles("Windows.PatchView.Handles")'' and ''Handles.SetSourceHandleRangeFromHandles(Windows.PatchView.Handles, true)'' make sure the repatch is performed with the currently selected fixtures * ''Patch.Repatch.SetDmxAddressesFromSelectedFixture()'' sets the current properties (DMX line and channel) * ''Patch.SetCurrentDmxAssignment(42.1)'' defines the new address (e.g. the first address where the fixtures are supposed to be repatched to) * ''ActionScript.SetProperty.Enum("Patch.Repatch.BunchUp", "BunchUp")'' sets the repatch mode * ''Patch.Repatch.RepatchSelectedFixtures(true)'' performs the actual repatch, 'true' enforces to park conflicting fixtures * ''Handles.ClearSelection()'' and ''Programmer.Editor.ClearAll(false, false)'' nullify the current selection ===== How to use it ===== - you may alter the target address (''42.1'') to your liking - [[:macros:deploying|make this macro available]] - if you need to quickly repatch some fixtures, select them and fire this macro ~~DISCUSSION~~