Go to documentation repository
The SaveToFile method is used to save to a file the frame from the camera that is received in the data parameter of the FRAME_SENT event.
Syntax for method invocation:
function SaveToFile (path: String, data: String, param : Boolean)
You can also save the frame using the GET_FRAME reaction of the CAM object. To do this, you must specify the path for saving the file with the frame in the path parameter of this reaction. The FRAME_SENT event is created in the system if the GET_FRAME reaction doesn't have the path parameter. In the data parameter of the FRAME_SENT event, the frame that must be saved using the SaveToFile method is stored.
The reaction allows you to export a frame even if the camera is not displaying in the Video surveillance monitor.
Method argument:
Time of frame saving depends on the reference frame rate. The higher the reference frame rate, the shorter the time.
Example. When a frame is received from Camera 1, save it to the test.jpg file on disk D:
if (Event.SourceType == "CAM" && Event.SourceId == "1" && Event.Action == "FRAME_SENT") { SaveToFile("D:\\test.jpg",Event.GetParam("data"),true); }