FmtProgId

ITcEvent

The property returns the Formatter ProgId. The ProgId is the link to the chosen formatter. The formatter was chosen when the event was issued from the PLC function block (or other ADS device) or from a call to a Report EventFunktion like ITcEventLogC::ReportEvent,ITcEventC3::ReportEventEx or ITcEventLog::ReportEvent.

 

HRESULT FmtProgId([out, retval] BSTR *pVal);

Parameters

pVal

[out, retval] Pointer to an BSTR String that receives the formatter ProgId.

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 formatter ProgId
Dim progId As String
progId = evt.FmtProgId
Debug.Print progId