Page 612 - ExtendSim User Guide
P. 612

586
Creating a Custom User Interface
Notebooks
Popup menus
The Popups block (Utilities library) lets you create a popup menu of customized options that a user can select from to control model behavior. Connect the
block’s output to the input connector of any block that requires that value. Depending on the option selected, the block will output a value specified in its dialog table.
To create the popup menu, enter a label for each option in the second column of the table in the block’s dialog. Then clone the menu item to a worksheet, hier- archical block, or Notebook and connect the Popups block’s output to the block you want to control. When the user selects an option from the menu, the Popups block outputs the corresponding numeric value from the first column in the dialog’s table. You can create a popup menu with as many options as you want.
For an example where the Popups block is used, see the Monte Carlo model, located in the folder \Examples\Continuous\Standard Block Models. The hierarchical block labeled “Scenario in the lower right cor- ner contains a Popups block. That block is used to create the popups menu for the cases.
Popups block dialog
☞ You can link the table in the Popups’ dialog to an ExtendSim database table, creating a popup menu for selecting a database record.
On/Off Switch
The Switch block (Utilities library) can be used like an On/Off switch to control some aspect of a model. The block’s input connector is used to turn the Switch on and off; its output connector reports the status. A value of 0 (zero) indicates the Switch is off and a value of 1 (one) indicates it is on. This block is similar to the
Switch control described in page 588, but it has some additional features: the Switch block’s dialog has a Switch that can be cloned to the model worksheet, Notebook, and so forth; there is a dialog item that allows the Switch’s status value (1 or 0) to be linked to a database, global array, or Excel spreadsheet; and in a discrete event model, the Switch block can send a mes- sage to a connected block to notify it of a status change.
Additional blocks to control model execution
To give the user more customized control over model execution, the Run Model and Pause Sim blocks (Utilities library) provide additional settings that determine what happens when the model is run or paused. You can clone dialog items from the Run Model and Pause Sim blocks to the model worksheet, as part of creating a user interface. For more information, see “Blocks that control or monitor simulation runs” on page 603.
Notebooks
As you saw in the tutorial in Chapter 1, a Notebook is a window you can customize to help you organize and manage the data in a model. Each model has its own Notebook which can contain clones of dialog and plotter items (see “Cloning” on page 582), as well as text, pictures, and
Popups menu
How To


































































































   610   611   612   613   614