Using Channel Selection Lists

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help

Use the controls ChnComboBox or ChnListBox to define a channel selection list that is to be displayed in the user dialog box. The user dialog box takes the displayed selection terms from the Data Portal. The channels currently loaded in DIAdem appear in the channel selection list in channel number order.

Use the ChnComboBox control to select one channel. Use the ChnListBox control to select several channels.

To use both types of channel selection lists in a dialog box, complete the following steps:

Note  For this example, delete all the data in the Data Portal and load the data file Example.tdm from the library folder.
  1. Select the DIAdem SCRIPT panel.

  1. Select Edit»Create Dialog Box.

  2. Click the ChnComboBox control on the Controls bar. 

  3. Drag open the control in the dialog box.

  4. Click the Button control on the Controls bar. 

  5. Drag open the control in the dialog box. Position the button to the right of the ChnComboBox control.

  6. Click ... in the EventClick field on the Events tab. Button1 must be selected.

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

    Sub Button1_EventClick(ByRef This)
      Call MsgBoxDisp("Selected channel: " & ChnComboBox1.Text)
    End Sub
    Note  Add the above text to the lines generated automatically by the script editor.
  8. Select View»Script View.

  9. Click the ChnListBox control on the Controls bar. 

  10. Drag open the control in the dialog box.

  11. Click the column to the right of the SelectionMode field in the Properties tab and select 1–MultiSelection. The ChnListBox control must be selected.

  12. Click the Button control on the Controls bar. 

  13. Drag open the control in the dialog box. Position the button to the right of the ChnListBox control.

  14. Click ... in the EventClick field on the Events tab. Button2 must be selected.

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

    Sub Button2_EventClick(ByRef This)
      Dim i
      For i = 1 To ChnListBox1.MultiSelection.Count
        Call MsgBoxDisp("Selected channel: " & ChnListBox1.MultiSelection(i).Text)
      Next
    End Sub
    Note  Add the above text to the lines generated automatically by the script editor.
  16. Select File»Save As and save the file as Test.sud.

  17. Select View»Test in DIAdem.

  18. Select a channel in the selection field. Click the associated button so that the user dialog box displays a message with the selected channel name. Then select several channels in the selection list. Click the associated button so that the user dialog box displays consecutive messages with the selected channel names.

  19. Close the user dialog box in DIAdem.

  20. Close the dialog editor.

Examples

Analyzing and Displaying Channels Section by Section | Checking Dialog Box Entries | Dynamic User Dialog Box | Translating User Dialog Boxes | User Dialog Box for Entering Text and Numbers | User Dialog Box for Sequence Control | User Dialog Box in DIAdem VIEW | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | User Dialog Box with Changing Background Color | User Dialog Box with Curve Preview | User Dialog Box with Extended Table | User Dialog Box with Internet Explorer | User Dialog Box with Scalable Table | User Dialog Box with Selection Lists | User Dialog Box with Selection Lists | User Dialog Box with Subdialog Boxes | User Dialog Box with Tables | User Dialog Box with Tree | Wizard for Tolerance Evaluation

WAS THIS ARTICLE HELPFUL?

Not Helpful