Simul8 Tips, Technical Corner

Using Variables in Dialog Text

Sometimes within a dialog you may want to show a variable value to highlight useful information about simulation settings to users.

If you want to add descriptive text to your dialog but want to reference a variable value in the text, then if you place the variable name in curly brackets, SIMUL8 will put in the variable value when the dialog is displayed.

Example: In this simulation the process time of an activity is stored in the global variable ‘gbl_time’, this variable has been given a time of 10 minutes.

SIMUL8 Edit dialogue box

When this dialog is open the variable within the curly brackets will display as its value:

Menu showing activity time

This is really useful to use if the user needs this information to make a decision within the dialog, In this case it will be useful to know what the current activity time is to know if they would like to change it.

Menu showinga activity time