grandMA3 User Manual Publication

GetAttributeByUIChannel(integer)

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » GetAttributeByUIChannel(integer)
Version 2.1

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

  • Integer:
    The integer is the UI Channel index number.

Return

  • Handle:
    The handle to the attribute connected to the UI Channel.

Example

This example prints the "native" address to the first attribute of the first fixture in the current selection:

Lua
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