Hello,
We use Delphi.
We try to configure the initial set of the selected nodes (when the dialog is first displayed to the user) in TUABrowseDialog.
From documentation this is given by the contents of the InputOutputs.SelectionDescriptors collection.
We initialize it like this
MyUABrowseNodeDescriptor := CoUABrowseNodeDescriptor.Create;
MyUABrowseNodeDescriptor.EndpointDescriptor.UrlString := 'opc.tcp://opcua.demo-this.com:51210/UA/SampleServer';
MyUABrowseNodeDescriptor.EndpointDescriptor.UserIdentity.UserNameTokenInfo.UserName :='Hello';
MyUABrowseNodeDescriptor.EndpointDescriptor.UserIdentity.UserNameTokenInfo.Password :='psw';
BrowseDialog.InputsOutputs.SelectionDescriptors.Add(MyUABrowseNodeDescriptor);
BrowseDialog.ShowDialog(nil);
We get the following error in UABrowseDialog :
Exceptions
Type: OpcLabs.BaseLib.Forms.Browsing.Parts.BrowseNodesException
Data:
HelpLink:
HResult: -2146233088 (0x80131500)
InnerException:
Message: Cannot set selected path: Hosts=Hosts > OPC UA Host=opcua.demo-this.com > OPC UA Endpoint=opc.tcp://...:51210/UA/SampleServer. Node is not selectable.
Source:
StackTrace:
TargetSite:
How can we workaround that?
Is it the good way to do?
BTW: Our final Goal is to memorize the node configured by the user when he quits our application in order he find it next time he connects.