Difference between revisions of "Api.groups"
Chris Monson (Talk | contribs) (→getAttribute) |
Chris Monson (Talk | contribs) (→Methods) |
||
Line 42: | Line 42: | ||
Usage: | Usage: | ||
print(api.groups.getName("1,1")) | print(api.groups.getName("1,1")) | ||
+ | |||
+ | ==getProfileName== | ||
+ | '''getProfileName(groupPath As String) As String''' | ||
+ | |||
+ | Returns the name of the profile in use by the specified group. If this group is not a fixture and does not have a profile this function will return -1. | ||
+ | |||
+ | Usage: | ||
+ | print(api.groups.getProfileName("1,1,3")) | ||
==releaseAttribute== | ==releaseAttribute== |
Revision as of 20:16, 6 May 2013
Contents |
Information
Group Paths
A group path is a method for specifying a group in the group hierarchy. It is defined by use of a string.
An empty string ("") will specify the main group.
To specify a child of the main group you use that child's index number ex. "1"
To specify a child of a child, you use a comma, and the index of the next child you want to select ex. "1,3"
You can continue in this fashion throughout the group hierarchy. If you are looking at something nested deeply it may look like "1,3,2,1,4".
Methods
getAttribute
getAttribute(attribute As api.attributeTypes, groupPath As String) As Integer
Returns the value for a specified attribute on a specified group Returns -1 if the group can't be found
Usage:
print(api.groups.getAttribute(api.attributeTypes.intensity, "1,1"))
getChildCount
getChildCount(groupPath As String) As Integer
Returns the number of children in a group Returns -1 if the group can't be found
Usage:
print(api.groups.getChildCount("1,1"))
getName
getName(groupPath As String) As String
Returns the name of the requested group Returns -1 if the group can't be found
Usage:
print(api.groups.getName("1,1"))
getProfileName
getProfileName(groupPath As String) As String
Returns the name of the profile in use by the specified group. If this group is not a fixture and does not have a profile this function will return -1.
Usage:
print(api.groups.getProfileName("1,1,3"))
releaseAttribute
releaseAttribute(attribute As api.attributeTypes, groupPath As String)
Releases the specified attribute on the specified group.
Usage:
api.groups.releaseAttribute(api.attributeTypes.intensity, "1,1")
releaseGroup
releaseGroup(groupPath As String)
Releases the all attributes on the specified group.
Usage:
api.groups.releaseGroup("1,1")
setAttribute
setAttribute(attribute As api.attributeTypes, value As Integer, groupPath As String)
Sets the value of an attribute on a specified group.
Usage:
api.groups.setAttribute(api.attributeTypes.intensity, 65535, "1,1")