-- The purpose of this macro is to change the DMX2 component patch settings. In many DMX-controlled systems, the system is configured such that a single machine can "take over" for any other machine in the system simply by changing the DMX2 patch settings and recalling a preset from the router. This macro changes the universes patched in the DMX2 component, which is faster than manually importing. This script could easily be extended to reference a UserPin for the variable new starting address, making it possible to build presets on the lighting desk for very fast re-addressing of the backup machine.
-- We can access the DMX settings without having to find the component.
artNet = HippoNet.LocalHost.DMX
-- Get a table of the available universes indexed alphabetically by universe name.
univTable = artNet.Universes
-- Declare the new starting universe
newStart = 25
-- Iterate through table and replace the addresses for each entry
for k,v in pairs(univTable) do
univTable[k].Address = newStart
newStart = newStart + 1
-- Note that the GUI for DMX2 component will not display the new entries until you navigate away from that pinboard and back to it. However, the addresses have been set.