QuickOPC User's Guide and Reference
NodeElements Property (AEAreaOrSourceDialog)
Example 



OpcLabs.EasyOpcForms Assembly > OpcLabs.EasyOpc.AlarmsAndEvents.Forms.Browsing Namespace > AEAreaOrSourceDialog Class : NodeElements Property
Contains information gathered about OPC nodes (areas or sources in OPC event server's area space).
Syntax
'Declaration
 
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Public ReadOnly Property NodeElements As AENodeElement()
'Usage
 
Dim instance As AEAreaOrSourceDialog
Dim value() As AENodeElement
 
instance.NodeElements = value
 
value = instance.NodeElements
[ElementsNotNull()]
[NotNull()]
public AENodeElement[] NodeElements {get;}
[ElementsNotNull()]
[NotNull()]
public:
property array<AENodeElement^>^ NodeElements {
   array<AENodeElement^>^ get();
}
Example

.NET

// This example shows how to let the user browse for OPC Alarms&Events areas or sources. 

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

namespace FormsDocExamples._AEAreaOrSourceDialog
{
    static class ShowDialog
    {
        public static void Main1(IWin32Window owner)
        {
            var areaOrSourceDialog = new AEAreaOrSourceDialog
            {
                ServerDescriptor = {ServerClass = "OPCLabs.KitEventServer.2"}
            };

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

            // Display results
            string nodeElementsString = string.Join("\n", areaOrSourceDialog.NodeElements.Select(element => element));
            MessageBox.Show(owner, nodeElementsString);
        }
    }
}
# This example shows how to let the user browse for OPC Alarms&Events areas or sources.

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


areaOrSourceDialog = AEAreaOrSourceDialog()
areaOrSourceDialog.ServerDescriptor.ServerClass = "OPCLabs.KitEventServer.2"

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

# Display results.
print()
for nodeElement in areaOrSourceDialog.NodeElements:
    print(nodeElement)
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