The GetObjectChildIds method returns the identification (registration) numbers of the objects of the specified type that are below the specified object in the object hierarchy.
Syntax for method invocation:
function GetObjectParentId(parent : String, id : String, objtype : String) : String[]
Method arguments:
- parent is a required argument. It specifies the type of the system object which child objects you want to find out. Possible values: String type, range is limited by object types registered in the system.
- id is a required argument. It corresponds to the identification (registration) number of the object specified by the parent argument. Possible values: String type, range is limited by the identification numbers of objects of the specified type registered in the system.
- objtype is a required argument. It specifies the type of the system object which is a child of the type specified by the parent argument. Possible values: String type, range is limited by object types registered in the system.
Example. On macro 1, arm all cameras on the WS2 computer.
if (Event.SourceType == "MACRO" && Event.Action == "RUN" && Event.SourceId == "1")
{
var children = GetObjectChildIds("SLAVE","DESKTOP-UBOS6BK","CAM");
ch=children.split(",");
for (i=0;i<ch.length; i++ )
{
DoReactStr("CAM",ch[i],"ARM","");
}
}