-
-
Notifications
You must be signed in to change notification settings - Fork 6
GetAttributeIndex
Anthony Headley edited this page May 4, 2020
·
2 revisions
Returns an attribute index given it's name
Name | Type | Description | Optional |
---|---|---|---|
attributeName | string | An attribute name found in Menu > Patch > Attribute Definations
|
Type | Description |
---|---|
int | index |
nil | if attribute does not exists |
Note that the attribute index is a zero based version of the Menu > Patch > Attribute Definations
Number. also it does not look up the Pretty name. A Attribute may not exits until a fixture with that attribute is patched.
Echo(GetAttributeIndex('Dimmer')) -- 0
Echo(GetAttributeIndex('Pan')) -- 1
Echo(GetAttributeIndex('Color1')) -- 56
local x = GetAttributeIndex('Color 1') -- x == nil