Creating a User Dialog Box without Linking Variables

DIAdem 2018 Help


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

DOWNLOAD (Windows Only)


DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Use the Text property to access the settings made in user dialog boxes.

Complete the following steps to generate a user dialog box that reads in two numbers, calculates the sum, and displays the results in a text.

  1. Select the DIAdem SCRIPT panel.

  1. Select Edit»Create Dialog Box.

  2. Click the Text control on the Controls bar. 

  3. Drag open the control in the dialog box.

  4. Click the column to the right of the Text field on the Properties tab. Text1 must be selected. EnterFirst Value:as the text.

  5. Click the EditBox control on the Controls bar. 

  6. Drag open the control in the dialog box. Position EditBox1 next to the text.

  7. Click the column to the right of the ObjectCode field on the Properties tab. EditBox1 must be selected. Enter ebFirstVal as the name.

  8. Click the Text control on the Controls bar. 

  9. Drag open the control in the dialog box.

  10. Click the column to the right of the Text field on the Properties tab. Text2 must be selected. EnterSecond Value:as the text.

  11. Click the EditBox control on the Controls bar. 

  12. Drag open the control in the dialog box. Position EditBox2 next to the text.

  13. Click the column to the right of the ObjectCode field on the Properties tab. EditBox2 must be selected. Enter ebSecondVal as the name.

  14. Click the Text control on the Controls bar. 

  15. Drag open the control in the dialog box. Position the text below the textboxes.

  16. Click the column to the right of the Text field on the Properties tab. Text3 must be selected. EnterResult:as the text.

  17. Click the Button control on the Controls bar. 

  18. Drag open the control in the dialog box. Position the button below the input text.

  19. Click the column to the right of the Text field in the Properties tab and enter Calculate. Button1 must be selected.

  20. Click the column to the right of the EventClick field on the Events tab. Button1 must be selected.

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

    Sub Button1_EventClick(ByRef This)
      Dim dVal : dVal = val(ebFirstVal.Text) + val(ebSecondVal.Text)
      Text3.Text = "Result : " & str(dVal)
    End Sub 
    Note  Add the above text to the lines generated automatically by the script editor.
  22. Select File»Save As and save the file as Test.sud.

  23. Select View»Test in DIAdem.

  24. Enable the first input field and enter a number. Enable the second input field and also enter a number. Click Calculate.

    The user dialog box calculates the sum of the two numbers and displays the result in a text.

  25. Close the user dialog box in DIAdem.

  26. 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