MenuItem refers to one of the softkey menu options, specifically in this case it is one of the attribute softkeys shown when you press the
Off button. When you press the softkey in the menu it calls this function passing in a reference to itself, from this it determines which attribute was selected. This is not something that it practical to use in your own macros, instead you should consider the
SetControlOff* function.
Code: Select all
Group.RecallGroup(userNumber:1)
Programmer.Editor.Fixtures.SetControlOff(Programmer.Editor.Fixtures.GetControlIdFromName("Shutter"))
Above I have also used the
GetControlIdFromName function to get the control/attribute ID which
SetControlOff takes as a parameter, some of these are pre-defined such as
Dimmer being
16 however many others are not.
To remove the Off flag you can call
SetControlProgrammer, if the programmer parameter is set to
true it will leave/put the value in the programmer (and remove the Off flag if there is one), if it is set to
false the attribute will be cleared.
Code: Select all
Group.RecallGroup(userNumber:1)
Programmer.Editor.Fixtures.SetControlProgrammer(Programmer.Editor.Fixtures.GetControlIdFromName("Shutter"), true)
To turn an attribute on you need to first select the attribute you want to change and then run the
SetSelectedControlsOn function:
Code: Select all
Group.RecallGroup(userNumber:1)
Programmer.Editor.Fixtures.SetContextAttributeFromId(Programmer.Editor.Fixtures.GetControlIdFromName("Shutter"))
Programmer.Editor.Fixtures.SetSelectedControlsOn(true)
Pass in
true to set the flag,
false to remove it. If you prefer there is a matching
SetSelectedControlsOff function that you can use in the same way.
* Internally attributes are referred to as controls so the two terms are sometimes used interchangeably.