Go to documentation repository

Page tree

Documentation for Intellect 4.10.4. Documentation for other versions of Intellect is available too.

Previous page The GetObjectIds method  The SourceType property Next page


Skip to end of metadata
Go to start of metadata

GetObjectParams method is designed for getting the object’s parameters.

Method call syntax:

 function GetObjectParams(objectType : String, objectId : String)

Method arguments:

  1. objectType – required argument. Set the type of the system object ("CAM", "GRAY", "GRABBER" e.t.c.), for which the type of a parent object should be given back. Accepted values: type String, range is restricted by object types  registered in the system.
  2. objectId – object’s identifier. Accepted values: String type.

Example. It is necessary to check the color control of camera №2  upon the start of Macros№1. If camera 2 is a color one, set it to recording.

 if (Event.SourceType == "MACRO" && Event.SourceId && Event.Action == "RUN")
{
var msg = CreateMsg();
msg.StringToMsg(GetObjectParams("CAM", "2"));
if(msg.GetParam("color") == "1")
{
DoReactStr("CAM", "2", "REC", "");
}
}