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