QuickOPC User's Guide and Reference
ConditionElement Property (AECategoryConditionDialog)
Example 



OpcLabs.EasyOpcForms Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.Forms.Browsing Namespace > AECategoryConditionDialog Class : ConditionElement Property
Contains information gathered about an OPC event condition.
Syntax
'Declaration
 
<DefaultValueAttribute("")>
Public ReadOnly Property ConditionElement As AEConditionElement
'Usage
 
Dim instance As AECategoryConditionDialog
Dim value As AEConditionElement
 
instance.ConditionElement = value
 
value = instance.ConditionElement
[DefaultValue("")]
public AEConditionElement ConditionElement {get;}
[DefaultValue("")]
public:
property AEConditionElement^ ConditionElement {
   AEConditionElement^ get();
}
Example

.NET

// This example shows how to let the user browse for an OPC Alarms&Events condition available on a specified event category.

using System.Windows.Forms;
using OpcLabs.EasyOpc.AlarmsAndEvents.Forms.Browsing;

namespace FormsDocExamples._AECategoryConditionDialog
{
    static class ShowDialog
    {
        public static void Main1(IWin32Window owner)
        {
            var categoryConditionDialog = new AECategoryConditionDialog()
            {
                ServerDescriptor = {ServerClass = "OPCLabs.KitEventServer.2"},
                CategoryId = 0x00EC0002  // Deviation
            };

            DialogResult dialogResult = categoryConditionDialog.ShowDialog(owner);
            if (dialogResult != DialogResult.OK)
                return;

            // Display results
            MessageBox.Show(owner, $"ConditionElement: {categoryConditionDialog.ConditionElement}");
        }
    }
}
# This example shows how to let the user browse for an OPC Alarms&Events condition available on a specified event
# category.

# The QuickOPC package is needed. Install it using "pip install opclabs_quickopc".
import opclabs_quickopc

# Import .NET namespaces.
from System.Windows.Forms import *
from OpcLabs.EasyOpc.AlarmsAndEvents.Forms.Browsing import *


categoryConditionDialog = AECategoryConditionDialog()
categoryConditionDialog.ServerDescriptor.ServerClass = "OPCLabs.KitEventServer.2"
categoryConditionDialog.CategoryId = 0x00EC0002  # Deviation

dialogResult = categoryConditionDialog.ShowDialog()
print(dialogResult)
if dialogResult != DialogResult.OK:
    exit()

# Display results.
print('ConditionElement: ', categoryConditionDialog.ConditionElement, sep='')
Requirements

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

See Also