QuickOPC User's Guide and Reference
_AECategoryElement Interface
Members  Example 



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.ComTypes Namespace : _AECategoryElement Interface
Exposes OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.AECategoryElement to COM clients.
Object Model
_AECategoryElement InterfaceAEAttributeElementCollection ClassAEAttributeElement ClassAEConditionElementCollection ClassAEConditionElement Class
Syntax
'Declaration
 
<CLSCompliantAttribute(False)>
<ComVisibleAttribute(True)>
<GuidAttribute("3306C0FE-3AEE-47F7-A6C3-2185787D9665")>
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)>
Public Interface _AECategoryElement 
'Usage
 
Dim instance As _AECategoryElement
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("3306C0FE-3AEE-47F7-A6C3-2185787D9665")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface _AECategoryElement 
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("3306C0FE-3AEE-47F7-A6C3-2185787D9665")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface class _AECategoryElement 
Example
Rem This example shows information available about OPC event category.

Option Explicit

Const AEEventTypes_All = 7

Dim ServerDescriptor: Set ServerDescriptor = CreateObject("OpcLabs.EasyOpc.ServerDescriptor")
ServerDescriptor.ServerClass = "OPCLabs.KitEventServer.2"

Dim Client: Set Client = CreateObject("OpcLabs.EasyOpc.AlarmsAndEvents.EasyAEClient")
On Error Resume Next
Dim CategoryElements: Set CategoryElements = Client.QueryEventCategories(ServerDescriptor, AEEventTypes_All)
If Err.Number <> 0 Then
    WScript.Echo "*** Failure: " & Err.Source & ": " & Err.Description
    WScript.Quit
End If
On Error Goto 0

Dim CategoryElement: For Each CategoryElement In CategoryElements
    WScript.Echo "Information about category " & CategoryElement & ":"
    With CategoryElement
        WScript.Echo Space(4) & ".CategoryId: " & .CategoryId
        WScript.Echo Space(4) & ".Description: " & .Description
        WScript.Echo Space(4) & ".ConditionElements:"
        Dim ConditionElement: For Each ConditionElement In .ConditionElements: WScript.Echo Space(8) & ConditionElement: Next
        WScript.Echo Space(4) & ".AttributeElements:"
        Dim AttributeElement: For Each AttributeElement In .AttributeElements: WScript.Echo Space(8) & AttributeElement: Next
    End With
Next
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2012, Windows Server 2016; .NET Core, .NET 5, .NET 6: Linux, macOS, Microsoft Windows

See Also

Reference

_AECategoryElement Members
OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.ComTypes Namespace