SIMUL8 Tip – Using “Do Not Display Dialogs” to make your simulation more user-friendly
We’ve talked about creating dialogs and menus to make your simulations easy to use for end users. This week, we’re going to look at using an additional Visual Logic command to add to our previous tip, giving you additional commands from the ribbon.
There is a Visual Logic command named Do Not Display Dialog, which can be used in the “On Open” Visual Logic section so that the dialog is not displayed to the user. This is most commonly used for allowing users to open an internal spreadsheet from a command menu without having to make the user click through a dialog first. It also means that you can tie any Visual Logic to a dialog without displaying it, letting you trigger Visual Logic from a custom menu on the ribbon.
To do this:
First, make sure the VL Can Hide Dialogs is checked on the Advanced Tab. This setting is enabled by default, but you should check before your using this method to avoid any confusion.
Once you have dialogs added to your command menu, add your logic to the “On Open” Visual Logic section of the dialog.
Use the command Do Not Display Dialog immediately before your logic. In this example, we will use additional logic to open a spreadsheet.
Now we need to add our dialog to the Command Menu on the Home Tab of the ribbon. 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!
Now you’ll be able to “see” your dialog on the Command Menu. Except, you won’t actually see it because we’ve chosen to hide it!
That means, when a user goes to the Home Tab and chooses “Open Inputs Sheet” from the Command Menu, it will open the spreadsheet that we declared in our Visual Logic. This can be extremely useful for easy access to modifying the spreadsheet, and helps an end user who may not be familiar with SIMUL8 or simulation to make changes to the simulation without additional training.
Try adding this command to your dialogs to trigger logic directly from the Home tab!