QuickOPC User's Guide and Reference
_AEConditionElement Interface
Members  Example 



OpcLabs.EasyOpcClassic Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.ComTypes Namespace : _AEConditionElement Interface
Exposes OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace.AEConditionElement to COM clients.
Syntax
'Declaration
 
<CLSCompliantAttribute(False)>
<ComVisibleAttribute(True)>
<GuidAttribute("9C6200EA-AA60-4135-B5AE-28ECD4A9C630")>
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)>
Public Interface _AEConditionElement 
'Usage
 
Dim instance As _AEConditionElement
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("9C6200EA-AA60-4135-B5AE-28ECD4A9C630")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface _AEConditionElement 
[CLSCompliant(false)]
[ComVisible(true)]
[Guid("9C6200EA-AA60-4135-B5AE-28ECD4A9C630")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface class _AEConditionElement 
Example
Rem This example shows information available about OPC event condition.

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 "Category " & CategoryElement & ":"
    With CategoryElement
        Dim ConditionElement: For Each ConditionElement In .ConditionElements
            WScript.Echo Space(4) & "Information about condition """ & ConditionElement & """:"
            With ConditionElement
                WScript.Echo Space(8) & ".Name: " & .Name
                WScript.Echo Space(8) & ".SubconditionNames:"
                Dim subconditionNames: subconditionNames = .SubconditionNames
                ' Note: In VBScript, cannot directly write .SubconditionNames(i); it considers it an indexed property instead.
                Dim i: For i = LBound(subconditionNames) To UBound(subconditionNames)
                    WScript.Echo Space(12) & subconditionNames(i)
                Next
            End With
        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

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