OnClearEvent

_ITcEventLogEvents

This event method is called on all clients that implement and connect this event interface when an event is cleared. This method is called on all events for one source id after a call of the PLC function block ADSCLEAREVENTS with the iMode set to TCEVENTLOGIOFFS_CLEAREVENTSRCID.

HRESULTOnClearEvent(ByVal
evtObj As Object);

Parameters

evtObj

[in] IDispatch pointer to a new event object of the class TvEvent. The event object provides the full access to the cleared event. Each client receives a reference to the event object and no copy.

S_OK

Function was successfully called

Visual Basic sample code

Option Explicit

Dim WithEvents evtLogger As TCEVENTLOGGERLib.TcEventLog

' form load
Private Sub Form_Load()
  ' get the one and only event logger
  Set evtLogger = New TcEventLog
End Sub

' event method
Private Sub evtLogger_OnClearEvent(ByVal evtObj As Object)
  Dim evt As TcEvent
  Set evt = evtObj
  ' print the message string in English
  Debug.Print evt.GetMsgString(1033)
End Sub