Page 764 - ExtendSim User Guide
P. 764

738 Data Management and Exchange
User interfaces for data exchange
The sections that follow show how to create a dynamic link between dialog items (parameters and data tables) and internal data structures (ExtendSim database tables and global arrays) through the user interface. To learn how to use ModL code to dynamically link dialog items to internal structures, see the Developer Reference.
There is overhead associated with the process of accurately updating a linked dialog item with a data structure. If you overload a model with links that frequently change, the model’s perfor- mance can suffer. Consider the following suggestions: 1) Just link the data that is important to a model and not link every piece of data to every possible source. 2) Import values into a Read block (Value library) for use in the model, so they don’t have to be continuously updated. 3) Send or receive link alert messages only at the start or end of the simulation as discussed in “Link dialog checkboxes” on page 743.
Linking a parameter to an internal data structure
Unless it is already linked for sensitivity analysis (see “Sensitivity analysis” on page 646) or through the DDE link feature (see “DDE links (Windows only)” on page 744), a dialog param- eter can be dynamically linked to a specific cell of an internal data structure.
Parameter fields that are dynamically linked to an internal data structure are outlined in light blue. (Parameter fields are outlined in green for active sensitivity analysis, red for inactive sen- sitivity analysis, and yellow for DDE linking (Windows only) to an external application.)
How to link a parameter to an ExtendSim database
The following example uses the Reservoir 1 model from the Tutorial module. It describes how to dynamically link the Holding Tank’s “Initial Content” parameter to a cell in a database.
Open an existing model and save it under a different name:
Open the Reservoir 1 model located in the folder \Examples\Tutorials.
So that you don’t overwrite the original file, save the model as ReservoirDBLink.
In the ReservoirDBLink model, open the Holding Tank dialog. Open the Link dialog by doing one of the following:
Click in the Holding Tank’s Initial contents parameter field and give the command Edit > Create/Edit Dynamic Link
Or, right click the Initial contents parameter field and choose Create/Edit Dynamic Link.
In the Link dialog’s top popup menu (shown at right with its default setting of “No User- Defined Link”) choose Link to: Database Table.
Link dialog popup menu, default option
How To


































































































   762   763   764   765   766