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.

DAItemDialog returns nothing when using MultiSelect

More
07 May 2014 13:15 #1939 by Jan
It is working! I didn't press the down arrow button.
My mistake.

Thank you!!

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

More
07 May 2014 11:57 #1935 by support
I have now tested MultiSelect == true in DAItemDialog with version 5.23.1162.1, and it works as expected. I have not tested version 5.21. Can you switch to 5.23 please (if you are a licensed user, then version 5.23 needs a different key file, but you can obtain it from us free of charge in this case).

While making the test first time, I have, however, fallen myself into a trap: Be aware that in a multi-selection mode of DAItemDialog, the items that are considered select in the dialog need to appear in the bottom list of the dialog. It is not sufficient to select (highlight) them in the list view on the right side. You have to press the button with the down arrow, to make them appear in the bottom list. This design exists to allow selection of items from different branches in the tree. I have marked up the UI elements in the picture below.






I hope this helps.
Attachments:
The following user(s) said Thank You: Jan

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

More
06 May 2014 19:29 #1929 by Jan
Thanks for quick response!
My version is: 5.21.132.1

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

More
06 May 2014 19:24 - 07 May 2014 11:51 #1928 by support
Can you please provide the full version/build? Right-click on one of the QuickOPC assemblies, select Properties, and find the version on the Details tab.

Thank you

(a copy of the code from the previous post:)
 
DAItemDialog dlg = new DAItemDialog();
dlg.MultiSelect = String.IsNullOrEmpty( item.Name ); // MultiSelect if name of // item not specified yet.
dlg.ServerDescriptor.MachineName = server.MachineName;
dlg.ServerDescriptor.ServerClass = server.ServerClass;
if ( dlg.ShowDialog( this.ParentLine.ViewControl ) == DialogResult.OK )
{
    int i = 0;
    foreach ( DANodeElement element in dlg.NodeElements )
    {
        if ( i == 0 )
        {
            if ( element.IsItem )
            {
                item.ItemID = element.ItemId;
                if ( String.IsNullOrEmpty( item.Name ) )
                {
                    item.Name = element.Name;
                }
                short vtValue = (short) m_instance.OPCClient.GetPropertyValue(
                    server.MachineName,
                    server.ServerClass,
                    item.ItemID,
                    DAPropertyId.DataType );
                item.OPCDataType = ItemData.ToOPCValueType( vtValue );
            }
            else
            {
            }
        }
        else
        {
            // Add new item to my list
            if ( element.IsItem )
            {
                ItemData it = new ItemData( item.ParentObject );
                it.Name = element.Name;
                it.ItemID = element.ItemId;
                this.ItemsList.Insert( this.ItemsList.IndexOf( item ) + i, it );
            }
        }
        i++;
    }
}
 
Last edit: 07 May 2014 11:51 by support.

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

More
06 May 2014 18:53 #1927 by Jan
Hi.

I'm trying to let the user select more than one element in the DAItemDialog.
But when I select more than one item the NodeElements property is an empty list.

Any idea what's wrong?

Im using QuickOPC 5.2.

My code:

File Attachment:

File Name: DAItemDialog.pdf
File Size:28 KB
Attachments:

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

Moderators: support
Time to create page: 0.051 seconds