DIAdem Help

Filtering Channel Groups and Channels in the Data Portal with a Script

  • Updated2024-09-12
  • 1 minute(s) read

Filtering Channel Groups and Channels in the Data Portal with a Script

Use Filters in the Data Portal to display only specific groups or channels. In addition, you can use pins in the Data Portal to always display specified groups and channels regardless of the enabled filters. 

To open the filter area and to only display the channel groups that start with the letter E, with a script complete the following steps. These channel groups are only to display the channels that start with the letters D or T:

  1. Select DIAdem SCRIPT.

  2. Select File»New»VBS Script to create a new script.

  3. Enter or copy the following text into the script editor:

    VBScriptPython

     

    Data.Root.Clear()
    Call DataFileLoad(DataLibrPath & "Example.tdm")
    Call Portal.Visible(TRUE)
    Call Portal.Structure.FilterForm.Expand(TRUE)
    Call Portal.Structure.ResetPinnedElements
    Portal.Structure.FilterForm.GroupFilterText = "E"
    Portal.Structure.FilterForm.ChannelFilterText = "D OR T"
  4. Select Script»Run VBS Script to start the script. The Data Portal now displays only the channel groups that start with the letter E. The Data Portal displays in these channel groups only the channels that start with the letter D or T.

Log in to get a better experience