QuickOPC User's Guide and Reference
MultiSelect Property (UADataDialog)
Example 



View with Navigation Tools
OpcLabs.EasyOpcForms Assembly > OpcLabs.EasyOpc.UA.Forms.Browsing Namespace > UADataDialog Class : MultiSelect Property
Determines whether the dialog allows the user to select multiple nodes as output.
Syntax
'Declaration
 
<DefaultValueAttribute(False)>
Public Property MultiSelect As Boolean
 
'Usage
 
Dim instance As UADataDialog
Dim value As Boolean
 
instance.MultiSelect = value
 
value = instance.MultiSelect
Remarks

When multi-select is enabled and the dialog allows the user to pick the OPC-UA endpoint, the count of endpoint descriptors must be the same as the count of node descriptors.

Example

.NET

// This example shows how to let the user browse for multiple OPC-UA data nodes (data variables or properties). 

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

namespace UAFormsDocExamples._UADataDialog
{
    static partial class ShowDialog
    {
        public static void MultiSelect(IWin32Window owner)
        {
            var dataDialog = new UADataDialog
            {
                EndpointDescriptor = { UrlString = "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer" },
                // or "http://opcua.demo-this.com:51211/UA/SampleServer" (currently not supported)
                // or "https://opcua.demo-this.com:51212/UA/SampleServer/"
                MultiSelect = true,
                UserPickEndpoint = true
            };

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

            // Display results
            MessageBox.Show(owner, 
                String.Join(Environment.NewLine, dataDialog.NodeElements.Select(element => element.ToString())));
        }
    }
}
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