Documentation for Intellect 4.11.0-4.11.3. Documentation for other versions of Intellect is available too.

Previous page Next page


You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The Clone method creates a copy of an MsgObject or Event object.

Method call syntax

Clone() : MsgObject

Method arguments: no arguments.

Usage examples

Problem. When Relay №1 closes, start video recording from Camera 1 and close Relay №2. When Relay №1  opens, start video recording from Camera 2 and open Relay №2.

 if (Event.SourceType == "GRELE" && Event.SourceId == "1")
{
  var msgevent = Event.Clone();
  if(Event.Action == "ON")
  {
    msgevent.SourceId = "2";
    DoReact(msgevent);
    DoReactStr("CAM","1","REC","");
DoReactStr("GRELE","2","ON","");
 
  }
  if(Event.Action == "OFF")
  {
    msgevent.SourceId = "2";
    DoReact(msgevent);
    DoReactStr("CAM","2","REC","");
DoReactStr("GRELE","2","OFF","");
 
  }
}
  • No labels