GetAttributeByUIChannel(integer)
Description
Section titled “Description”The GetAttributeByUIChannel Lua function returns the handle to an attribute based on a “UI Channel Index”. The index number can be found in the Parameter List.
Arguments
Section titled “Arguments”- Integer:
The integer is the UI Channel index number.
Return
Section titled “Return”- Handle:
The handle to the attribute connected to the UI Channel.
Example
Section titled “Example”This example prints the “native” address to the first attribute of the first fixture in the current selection:
| Copy CodeLua |
| ``` |
| return function() |
-- Get a handle to the first fixture in the current selectionlocal fixtureIndex = SelectionFirst()-- Get the UI Channel Index number for the first attribute for the fixturelocal channelIndex = GetUIChannelIndex(fixtureIndex,0)-- Print the native address for the attribute with the handlePrintf("The native addr for the attribute is: %s",GetAttributeByUIChannel(channelIndex):AddrNative())end