GetSubfixture(integer)
Description
Section titled âDescriptionâThe GetSubfixture Lua function returns the handle of the fixture specified by its patch index number.
Arguments
Section titled âArgumentsâ- Integer:
The patch index number for a fixture. This is also known as the âsubfixtureindexâ.
- Handle:
The function returns a handle to the fixture object matching the provided index number.
Example
Section titled âExampleâThis example uses a fixture selection to print all the information (in the Command Line History) about the first fixture in the selection using the Dump() function:
The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.
Learn more in the Dump() topic.
| Copy CodeLua |
| ``` |
| return function () |
-- Check for a fixture selection, by returning an index for the first fixtureif (SelectionFirst()) then -- There is a fixture selection, store the index for the first fixture local fixtureIndex = SelectionFirst() -- Dump all information about the fixture Printf("=============== START OF DUMP ===============") GetSubfixture(fixtureIndex):Dump() Printf("================ END OF DUMP ================")else -- There needs to be a selection of at least one fixture Printf("Please select a fixture")endend
### Related Functions
- [SelectionFirst](/grandma3/2-4/lua_objectfree_selectionfirst/)- [SelectionNext](/grandma3/2-4/lua_objectfree_selectionnext/)- [GetSubfixtureCount](/grandma3/2-4/lua_objectfree_getsubfixturecount/)