14.2. Defining a Sample Dialog Box

Engineering Knowledge Manager

User's Guide | Chapter 14: Defining Custom Dialog Boxes and Wizards in EKM Studio |

14.1. Launching the Custom Dialog Editor |  | 14.3. Setting the Operation of the Custom Dialog Box
Prev |  | Next

## 14.2. Defining a Sample Dialog Box

The procedure below describes the steps taken to define the following sample dialog box:

Figure 14.2: Design for Custom Dialog Box

To create the custom dialog box:

1. Consider the components of the dialog box to be designed.

   This sample design has two rows:

   - The first row contains the label Fluids Simulation Based Data Mining.

   - The second row contains the image and the labelled text boxes. The image in this example is a screen capture from a simulation.

2. Add a new step in the custom dialog node by clicking the "plus sign" icon in the Custom Dialog Node toolbar. The Grid Properties dialog box appears.

   Figure 14.3: Displaying the Grid Properties Dialog Box

3. In the Grid Properties dialog box, specify Rows as `2` and Cols as `1`, then click OK.

4. From the Widgets panel, drag a Grid into the bottom of the white field in the Editor panel.

   Tip: You can also add and remove grid elements by right-clicking on an existing grid cell. All actions performed in the Editor panel can be undone and redone by clicking the appropriate icons in the Custom Dialog Node panel.

   Specify Rows as `1` and Cols as `2`.

   Click OK.

5. From the Widgets panel, drag a Label into the top field in the Editor panel.

6. From the Widgets panel, drag an Image into the bottom-left field in the Editor panel. When prompted, select the Upload image option.

   In the Open dialog box, select the image in your local file system and click Open.

7. In the Repository path text box, enter the path of a repository folder in which the image will be saved (for example, `/Data/Shared Data`), then press the Tab key or click outside of the text box to set the value.

8. From the Widgets panel, drag a Grid into the bottom-right field in the Editor panel. Specify Rows as `10` and Cols as `1`. Click OK.

9. Drag Label widgets into alternating rows on the grid, starting at the first row.

10. Drag Reference widgets into the second, fourth, and eighth rows on the grid.

11. Drag a Dropdown List widget into the sixth row on the grid.

12. Drag a Text Box widget into the tenth row on the grid. The editor looks like this:

Now that the structure of the custom dialog is complete, add the values that you want to see:

1. Click in the top row (Label), then in the Properties > Default Value text box, type `Fluids Simulation Based Data Mining`. For Display Style, type `text-align: center; font-size: large; width: 100%`.

2. Provide the other labels as shown in the initial design for the Custom Dialog Box:

   - For Label (2): `Case File:`

   - For Label (3): `Data File:`

   - For Label (4): `Result Type:`

   - For Label (5): `Output Folder:`

   - For Label (6): `Output CVS File:`

3. Provide default values for the active elements:

   - For Reference: `/Data/Shared Data/Thermal Result Extraction/inputs/lamp.cas.gz`

   - For Reference (2): `/Data/Shared Data/Thermal Result Extraction/inputs/lamp.dat.gz`

   - For Reference (3): `/Data/Shared Data/HeadLamp-Application/output/`

   - For (Result Type drop-down list): In Enumeration, type:

     `Thermal Values in all BC-35`
     `Thermal Values in all BC-45`
     `Thermal Values in all BC-55`

   - For Text Box: `Thermal-Results-extraction.cvs`.

   Important: The values you specify for References are validated when uploaded to the repository. Thus, if there is a reference that does not exist in the repository, the upload will fail.

4. Specify the names and IDs for the variables from the script you created. (The values that follow are only examples.)

   - For Case File > Reference > Name: type `Case File`

   - For Case File > Reference > Id: type `caseFile`

   - For Data File > Reference > Name: type `Data File`

   - For Data File > Reference > Id: type `dataFile`

   - For Result Type > DropDown List > Name: type `Result Type List`

   - For Result Type > DropDown List > Id: type `resultTypeList`

   - For Output Folder > Reference > Name: type `Output Folder`

   - For Output Folder > Reference > Id: type `outputFolder`

   - For Output CVS File > Text Box > Name: type `Output File`

   - For Output CVS File > Text Box > Id: type `outputFile`

   When you click outside the text box after typing in a value, the software performs syntax checks and warns you of any syntax errors in the values you gave.

5. Modify the custom dialog node general definition:

   1. Give the node a descriptive name: in the Custom Dialog Node panel, click New Step 1 and in the Properties panel change the Name to `Step 1 — Take User Information`.

   2. Set the Step completion macro to `action` (the name of an existing macro).

6. Your custom dialog node is defined; you will set its operation in the next section.

   Figure 14.4: The Completed Custom Dialog Box

7. Save your custom dialog node by clicking OK. The Variables list updates in EKM Studio.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.