Skip to content

GetAttributeByUIChannel(integer)

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.

  • Integer:
    The integer is the UI Channel index number.
  • Handle:
    The handle to the attribute connected to the UI Channel.

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 selection
local fixtureIndex = SelectionFirst()
-- Get the UI Channel Index number for the first attribute for the fixture
local channelIndex = GetUIChannelIndex(fixtureIndex,0)
-- Print the native address for the attribute with the handle
Printf("The native addr for the attribute is: %s",GetAttributeByUIChannel(channelIndex):AddrNative())

end