<< Click to Display Table of Contents >>
TrackEvent |
TrackEvent(EventMessage, [Comment], [TimeStamp])
This method allows generating events manually via script. These events can be generated on a Elipse Power Viewer as well as on a Server, and are registered on an application's database table.
Parameters of the TrackEvent method
Name |
Description |
---|---|
EventMessage |
Contains an event's message, with a maximum of 200 characters |
Comment |
Contains additional comments about this event, with a maximum of 200 characters. This parameter is optional and, if omitted, assumes an empty String |
TimeStamp |
Indicates the date and time this event occurred. This parameter is optional and, if omitted, Elipse Power assumes the current date and time |
This method only records events in case the Events Recording option in Domain Options is enabled. Events are recorded on a database table, which is also defined on the Event Recording settings.
For more information on Domain's Event Log, please check the Elipse Power User's Guide. Example:
Sub Button1_Click()
Dim Tag, User, Comment
Set Tag = Application.GetObject("IO.Inputs.IO01")
If Application.ESign(Tag.PathName, , "Value Change", _
Tag.Value, 1, User, Comment) Then
If Tag.WriteEx(1) Then
Application.TrackEvent _
"Tag IO.Inputs.IO01 changed to 1 " &_
"by the user" & User, Comment
End If
End If
End Sub