Page 772 - ExtendSim User Guide
P. 772

746
Data Management and Exchange
Internal data storage and management methods
Managing DDE links
To change a linked value, change the value in the Excel workbook, then save the workbook. For instance, the Holding Tank’s Initial contents value in the previous example will change once the value in My Workbook has been changed and the file has been saved. To remove link- ing from a parameter, use the Edit > Delete DDE Link command.
The Show DDE Links command opens all the dialogs that are linked using that technology in a model. If linked applications are open and the links don’t appear to be working correctly, or if the server application has been closed, the Refresh DDE Links command attempts to reestab- lish existing links between ExtendSim and the external application.
If you directly change the value of an ExtendSim parameter or cell that has been linked, the field will still be outlined in yellow but the model will use the value you entered instead of the link value. The model will automatically refresh the link if the DDE value is changed and the external file is saved.
Updating remote references
Creating a DDE link works in a fairly straightforward manner with the following exception: Excel doesn’t support reconnecting links in embedded objects when they are reopened by default. There is an option called Update Remote References in Excel’s Options dialog that will enable this behavior. The following Excel VBA macro will turn this flag on:
       Private Sub Workbook_Open()
         With ThisWorkbook
         .UpdateRemoteReferences = True
          End With
       End Sub
Unfortunately the value of this option does not seem to be saved in embedded Excel worksheet objects. This means that the macro above should be used in worksheets that are embedded into ExtendSim models if they use DDE link connections to share data with ExtendSim.
Internal data storage and management methods
This portion of the chapter provides information about ExtendSim internal data structures. Other parts of this chapter discuss methods (such as dynamic data linking or ExtendSim blocks) for exchanging data with the internal data structures. For information about using ModL programming to interface with internal data structures, see the Developer Reference.
As discussed in the following sections, ExtendSim provides several internal structures for stor- ing data for use in a model. See:
• ExtendSim databases that start on this page • Globalarraysstartingonpage765
• Dynamicarraysonpage768
• Embeddinganobjectthatstartsonpage768 • Linked lists as discussed on page 770
Access to internal data sources is accomplished through a user interface feature called dynamic data linking (DDL), by the use of data access blocks, or by programming in ModL. Databases and global arrays are accessible by the modeler and by block developers; dynamic arrays and linked lists are only accessible by block developers coding in ModL.
How To


































































































   770   771   772   773   774