08-26-2014 05:36 AM
Hi,
I have 1000 channels, and trying to create a filter search for the ChnList Box in my dialog box, is this possible?
Thank you
Solved! Go to Solution.
08-26-2014 06:32 AM
Hi,
i solved this with a combination of xtable- and editbox-object.
Greetings,
Martin
08-26-2014 08:36 AM
Ideally I am looking to use ChnList Box as its how my script is structured. The loaded data channels vary each time data is loaded. I understand this could be implemented with an xtable, but is it possible with a ChnList box ?
Thanks
08-26-2014 11:47 AM
Hi Soton,
I think you definitely want to stick with the Channel List Box control. I'd suggest that you programmatically use the filter form in the Data Portal to do the filter string matching, like this:
Set PortalDisp = Portal.Structure PortalDisp.FilterForm.ChannelFilterText = "Gen" ' < your filter string here > Call PortalDisp.FilterForm.Expand(1) FOR Each Group In Data.Root.ChannelGroups FOR Each Channel In Group.Channels IF PortalDisp.IsElementDisplayed(Channel) THEN i = i + 1 ' add to ChnListBox ' ChnListBox.Items.Add Channel.Name, i Msg = Msg & Channel.Name & vbCRLF END IF NEXT ' Channel NEXT ' Group MsgBox Msg
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-19-2017 05:45 AM
I have used Brad's inputs for my example program. It performs a filtered group and channel search using dialog:
Filtered Data Portal Search with DIAdem Dialog - Discussion Forums - National Instruments