- Posts: 345
- Thank you received: 4
Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Discovery, Browsing, Browse Dialogs and Controls
- After we browse and select multiple items we get a crash
After we browse and select multiple items we get a crash
Michael
Please Log in or Create an account to join the conversation.
opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...rd.UAObjectIds_properties.html
Add "Imports OpcLabs.EasyOpc.UA.AddressSpace.Standard" to the list of Imports at the beginning of the code file.
Best regards
Please Log in or Create an account to join the conversation.
When I add this line before the ShowDialog line, I get an error on "UAObjectIds.ObjectsFolder". Do I need to define this variable? If yes, how?
uaDataDialog1.NodeDescriptor = New UANodeDescriptor(UAObjectIds.ObjectsFolder)
If uaDataDialog1.ShowDialog() = DialogResult.OK Then
Thanks.
Michael
Please Log in or Create an account to join the conversation.
I wrote "a workaround would be ... always just before calling ShowDialog();"
There is just one line in your code snippet that calls ShowDialog, thus the instructions are unambiguous. So, you need to insert the additional statement just before the statement that calls ShowsDialog.
Best regards
Please Log in or Create an account to join the conversation.
I know the difference between C# and VB.Net...
Can you show me what to replace in my VB.Net code by your line of code (dataDialog.NodeDescriptor = New UANodeDescriptor(UAObjectIds.ObjectsFolder)).
Thank you.
Michael
Please Log in or Create an account to join the conversation.
dataDialog.NodeDescriptor = New UANodeDescriptor(UAObjectIds.ObjectsFolder)
Please Log in or Create an account to join the conversation.
Thank you. Our code is in VB.Net. Do you have a workaround in VB.net?
Thanks.
Michael
Please Log in or Create an account to join the conversation.
this turned out to be a bug in UADataDialog, thank you for pointing it out.
It will be fixed in QuickOPC 2020.3 which should be out in December.
For now, a workaround would be to reset the NodeDescriptor proeprty of the dialog always just before calling ShowDialog(); in C#, it looks like this:
dataDialog.NodeDescriptor = new UANodeDescriptor(UAObjectIds.ObjectsFolder);
Please Log in or Create an account to join the conversation.
Public Sub GlobalTagBrowse_UA(MyServer As String)
'Dim server_properties As OPC_servers_data
Dim easyDAClient = New EasyDAClient()
Dim values() As UANodeDescriptor
Dim i As Integer = 0
Dim itmX As ListViewItem
Dim itemF As ListViewItem
Dim nodeId As String
'Dim Index As Integer
'Dim NamespaceIndex As Integer
Dim L As String
nodeId = ""
If (MyServer.Length > 0) Then
uaDataDialog1.EndpointDescriptor = MyServer
uaDataDialog1.MultiSelect = True
If uaDataDialog1.ShowDialog() = DialogResult.OK Then
values = uaDataDialog1.NodeDescriptors 'NodeDescriptors
For i = 0 To (values.Count - 1)
L = "s"
Select Case values(i).NodeId.NodeIdType.ToString
Case "String"
L = "s"
Case "Numeric"
L = "n"
End Select
nodeId = "ns=" + values(i).NodeId.NamespaceIndex.ToString + ";" + L + "=0:" + values(i).NodeId.Identifier.ToString
itemF = ListView2.FindItemWithText(nodeId) 'values(i).NodeId.ToString) '
If (itemF Is Nothing) Then
itmX = ListView2.Items.Add(nodeId, 0) ' values(i).NodeId.ToString
If values(i).BrowsePath.Length > 0 Then
itmX.SubItems.Add(values(i).BrowsePath.ToString)
Else
itmX.SubItems.Add("")
End If
End If
Next i
End If
Else
MsgBox("Enter the OPC-UA server endpoint first.", vbExclamation, "Info")
End If
End Sub
Thank you.
Michael
Please Log in or Create an account to join the conversation.
I suspect that this problem might be a combination of not-too-well documented requirements for arguments used with MultiSelect (my fault), and some specific thing in your code that violates these requirements (which you could not know). Specifically, I am interested in how you set the NodeDescriptors and and EndpointDescriptors of the UADataDialog in your code.
Can you post here the whole loop (so that I can see what happens when between the subsequent runs of the dialog)? Or, if it is confidential, can you send it to me by email?
Thank you
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in .NET
- Discovery, Browsing, Browse Dialogs and Controls
- After we browse and select multiple items we get a crash