Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The GetObjectState method  The GetObjectIdByParam method Next page


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:

  1. objtype is a required argument. It corresponds to the type of system object for which you want to return the type of the parent object. Possible values: String type, range is limited by object types allowed in the system.

Note

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);
 }
}