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.
- 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