Professional OPC
Development Tools

logos

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.

Can we use the Tag Item browsing dialog to select more than one item?

More
25 Jan 2019 16:31 #7041 by support
Thank you for letting me know.

The reason the dialog is designed in this way is because the user may select items from different branches in the tree, and it would be impossible for him to keep track of what has been selected and there, if the items were just marked at their normal position.

Best regards
The following user(s) said Thank You: micham

Please Log in or Create an account to join the conversation.

More
25 Jan 2019 08:20 #7040 by micham
Thank you for your answer. Now it is understood. I didn't move the items down. I don't the warning any more.
Regards,
Michael

Please Log in or Create an account to join the conversation.

More
25 Jan 2019 06:56 #7039 by support
Ad 1.

Form1.DaItemDialog1.NodeDescriptors contains node descriptors of all selected items. In this sense, the code is OK, even though I do not know what you do further with the 'values' variable. You should probably go through its elements, and process them somehow. Each descriptor contains an ItemID.

TagName = Form1.DaItemDialog1.NodeElement.ItemId will only work if the user has selected precisely one item. In all other cases, you would be dereferencing a null. With MultiSelect = true, you'd rather use NodeElements (and NodeDescriptors), and not NodeElement/NodeDescriptor.

Ad 2.

There is no way to suppress the warning. But, are you saying that you have moved some items into the bottom area of the dialog (which is what only makes them selected), and you *still* get this warning?

Regards

Please Log in or Create an account to join the conversation.

More
25 Jan 2019 06:12 #7037 by micham
Hi,
1. See below the entire code:

Public Function GlobalTagBrowse(MyServer As String) As String
Dim easyDAClient = New EasyDAClient()
Dim values() As DANodeDescriptor

Form1.DaItemDialog1.ServerDescriptor.MachineName = server_properties.server_comp_name
Form1.DaItemDialog1.ServerDescriptor.ServerClass = server_properties.RealServerName
Form1.DaItemDialog1.MultiSelect = True
If Form1.DaItemDialog1.ShowDialog() = DialogResult.OK Then
values = Form1.DaItemDialog1.NodeDescriptors
TagName = Form1.DaItemDialog1.NodeElement.ItemId
End If
...
End Function

2.Regarding the warning message, it is displayed when I click on the OK button. Is there a way to prevent this message?

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
24 Jan 2019 21:02 #7036 by support
The code contains good parts, but does not look complete. For one, the actual dialog invocation is missing.

Regarding the warning message, the actual selection is done by the buttons in the middle of the dialog - they move the currently focused items into the selected list, or remove them again.

Regards

Please Log in or Create an account to join the conversation.

More
24 Jan 2019 20:39 #7035 by micham
One more thing, after I select several items and click on the OK button, I get the following error message:

"No Node is selected. Are you sure you want to close the form?"

Thank you.

Michael

Please Log in or Create an account to join the conversation.

More
24 Jan 2019 20:29 #7034 by micham
Hi,

Thank you for your answer. Is the code below correct? Should I get the output in the values variable?

Thanks.
Michael


Dim values() As DANodeDescriptor

Form1.DaItemDialog1.MultiSelect = True
values = Form1.DaItemDialog1.NodeDescriptors

Please Log in or Create an account to join the conversation.

More
24 Jan 2019 19:56 #7033 by support
Yes: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ml#OPC-DA%20Item%20Dialog.html .

Quote:

On the output, the dialog fills the information about selected nodes into the NodeElements property (and updates the NodeDescriptors property as well).

Best regards

Please Log in or Create an account to join the conversation.

More
24 Jan 2019 19:43 #7032 by micham
Hi,
Can we use the Tag Item browsing dialog to select more than one item?

Should we set the following property to True before we call DaItemDialog1.ShowDialog()?

DaItemDialog1.MultiSelect = True

If yes, how can we retrieve all the selected item names?

Thank you.

Michael

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.056 seconds