Icon:
The OPC-UA Data Dialog (UADataDialog class) allows the user to interactively select the OPC data node residing in a specific OPC Unified Architecture server. It also has a different mode (controlled by the UserPickEndpoint property) which allows the user to start the node selection by choosing the host and server endpoint first.
Here is an example of OPC-UA Data dialog in action:
In the default mode (when UserPickEndpoint is false), your code should set the EndpointDescriptor property to specify the OPC Unified Architecture server whose nodes are to be browsed. If you want the user to pick the endpoint, set the UserPickEndpoint property to true; in this case, setting the EndpointDescriptor is not needed on input.
After setting the inputs as needed, your code calls the ShowDialog method. If the result is equal to DialogResult.OK, the user has selected the OPC data node, and information about it can be retrieved from the NodeElement (and also NodeDescriptor) property. If UserPickEndpoint is true, the chosen server endpoint can be retrieved from the EndpointDescriptor property.
The user can browse through the UA Objects, and select from Data Variables or Properties.
When you set the MultiSelect property of the UADataDialog to true, the dialog will allow the user to select any number of OPC-UA nodes. The list below the folders and data nodes (labeled “Selected nodes”) contains the set of nodes that the user has selected in the dialog. The user can freely add nodes to this list, or remove them. The selected set is carried over to next invocation of the dialog, unless you change it from the code.
In the multi-selection mode, the set of nodes selected on input (if any) is in the NodeDescriptors property. On the output, the dialog fills the information about selected nodes into the NodeElements property (and updated the NodeDescriptors property as well).
If UserPickEndpoint is true, each node may come from a different server. In this case, the EndpointDescriptors array contains the server endpoints for each node in NodeDescriptors, with corresponding indices in both arrays. The arrays must have the same length.
If you want to change the parameters of the client object the component uses to perform its OPC operations, you can use the ClientSelector Property.