DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ChnList Box Filter Search

Solved!
Go to solution

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

0 Kudos
Message 1 of 5
(5,290 Views)

Hi,

 

i solved this with a combination of xtable- and editbox-object. 

 

Greetings,

Martin

0 Kudos
Message 2 of 5
(5,286 Views)

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

0 Kudos
Message 3 of 5
(5,281 Views)
Solution
Accepted by Soton14

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

0 Kudos
Message 4 of 5
(5,271 Views)

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

https://forums.ni.com/t5/Example-Program-Drafts/Filtered-Data-Portal-Search-with-DIAdem-Dialog/ta-p/...

 

Filtered_Search.PNG

Eric H.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 5
(2,403 Views)