API Dim progId As String progId = evt.FmtProgId Debug.Print progId 9.3.8.11 Date ITcEvent [ } 157] The property returns the event date and time. The event date and time is the time when the event was issued. HRESULT Date([out, retval] DATE *pVal); Parameters pVal [out, retval] Pointer to a long value that receives the event date and time. Return Values S_OK Function was successfully called E_POINTER pVal was no valid pointer.
Visual Basic sample code ' get the one and only event logger Dim evtLogger As TCEVENTLOGGERLib.TcEventLog Set evtLogger = New TCEVENTLOGGERLib.TcEventLog ' get the most recent active event Dim evt As TcEvent Set evt = evtLogger.GetLastEvent ' get the event date and time Dim dateTime As Date dateTime = evt.Date Debug.Print dateTime 9.3.8.12 GetData ITcEvent [ } 157] The property returns a safearray of data that was append to the event when it was logged. The data can be included into the event message by the formatter. The data was append when the event was issued from the PLC function block (or other ADS device) or from a call to a Report Event Function like IT [ } 137]cEventLogC [ } 137] ::
ReportEvent [ } 138] , ITcEventC3 [ } 141] :: ReportEventEx [ } 143] or ITcEventLog [ } 129] :: ReportEvent [ } 129] . HRESULT GetData([in,out] SAFEARRAY(VARIANT)* data); Parameters data [out, retval] Pointer to a safearray of variants that receives the event data TcEventLogger 165 Version: 1.1