GetAttributeIndex(string)
Description
Section titled âDescriptionâThe GetAttributeIndex Lua function returns the (0 based) index number of the attribute definition based on the system name of the attribute.
Arguments
Section titled âArgumentsâ- String:
The string text of the attribute system name.
- Integer:
The returned integer number represents the total amount of patched fixtures on all the stages in the show file.
Example
Section titled âExampleâThis example prints the index number of the attribute in Command Line History if it exists:
| Copy CodeLua |
| ``` |
| return function() |
-- store the returned index or nil of "Gobo1"local attributeIndex = GetAttributeIndex("Gobo1")-- Check if the returned value is not nil and print a useful feedbackif attributeIndex~=nil then Printf("Attribute is index number %i", attributeIndex)else Printf("The attribute is not found")endend