Written by on Friday December 21st 2012 in Friday Tips, The SIMUL8 Brain

Friday’s Tip – Create Custom Dialogs and Menus for Your Users

SIMUL8 has the useful ability to allow users to create custom dialogs and menus, which provide a user-friendly way to let simulation advocates make changes to your simulation.

Custom dialogs can display SIMUL8 information store data and allow information store data to be changed by the user. This makes it very easy for someone to use simulation on a daily basis without any understanding of how to build simulations, and without the simulation builder having to use external packages like Visual Basic or EXCEL!

Let’s use a simple example of how to change an Activity’s process time via a custom dialog. The first thing we will do is create a global variable (number) that will store the information regarding the Activity’s process time.

To create this variable, navigate to the Data and Rules Tab > Information Store > Create New Global Variable: Number ; in this example, let’s name this gblProcessTime. Once this has been created, we will then set Activity’s 1 process time to be gblProcessTime.

Now to create the dialog: Navigate to Insert > Dialogs > New.

When on the Edit Dialog properties, you will see that you can add various controls to the dialog. In our case, we only need to have a Title and Data Field. The Data Field will represent which variable we want to change, so in our case we will choose the Global Data Item gblProcessTime. Since this needs to be a number, we will enable the validity check, also ensuring that it has to have a minimum value of 1.

We have to now add the dialog to a place where it is easily accessible for our users. On the Insert Tab, select Command Menus. Here, you will be able to choose where your dialog will appear within the simulation; you can have the dialog opened immediately upon opening, or you can add it so that it appears in the menu. If you make the dialog appear in the menu, you will then be able to access the dialog from the Home tab!