QuickOPC User's Guide and Reference
CategoryId Property (AEAttributeDialog)
Example 



OpcLabs.EasyOpcForms Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.Forms.Browsing Namespace > AEAttributeDialog Class : CategoryId Property
Event category ID.
Syntax
'Declaration
 
<DefaultValueAttribute(0)>
Public Property CategoryId As Long
'Usage
 
Dim instance As AEAttributeDialog
Dim value As Long
 
instance.CategoryId = value
 
value = instance.CategoryId
[DefaultValue(0)]
public long CategoryId {get; set;}
[DefaultValue(0)]
public:
property int64 CategoryId {
   int64 get();
   void set (    int64 value);
}
Example

.NET

// This example shows how to let the user browse for an OPC Alarms&Events attribute.

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

namespace FormsDocExamples._AEAttributeDialog
{
    static class ShowDialog
    {
        public static void Main1(IWin32Window owner)
        {
            var attributeDialog = new AEAttributeDialog
            {
                ServerDescriptor = {ServerClass = "OPCLabs.KitEventServer.2"},
                CategoryId = 0x00EC0001
            };

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

            // Display results
            MessageBox.Show(owner, $"AttributeElement: {attributeDialog.AttributeElement}");
        }
    }
}
# This example shows how to let the user browse for an OPC Alarms&Events attribute.

# 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 *


attributeDialog = AEAttributeDialog()
attributeDialog.ServerDescriptor.ServerClass = "OPCLabs.KitEventServer.2"
attributeDialog.CategoryId = 0x00EC0001

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

# Display results.
print('AttributeElement: ', attributeDialog.AttributeElement, 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