The GetObjectParentType method returns the type of the parent object for the specified object according to the system object hierarchy.
Syntax for method invocation:
function GetObjectParentType (objtype : String) : String |
Method arguments:
In the hierarchy of system objects, the Main object is the highest level object. This object is the parent object for all objects of the Computer type, Screen type and others. |
Example. On macro 1, display in the debug window the names of four objects, starting from the detection zone, in the order of the hierarchy provided by Axxon PSIM.
if (Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN")
{
var objtype = "CAM_ZONE";
DebugLogString(objtype);
for(var i = 1; i<=4; i=i+1)
{
objtype = GetObjectParentType(objtype);
DebugLogString(objtype);
}
} |