Page 771 - ExtendSim User Guide
P. 771

Data Management and Exchange 745
User interfaces for data exchange
• You have selected a location in the ExtendSim model to paste to.
Parameters or cells that have been linked with this command are outlined in yellow. Extend- Sim’s DDE links are saved with the model. When the model is opened, ExtendSim will attempt to re-establish the associated links.
☞ An Excel worksheet embedded in an ExtendSim model can also be linked to ExtendSim data via the Paste DDE Link command.
How to create a DDE link to ExtendSim
The following example uses a Microsoft Excel workbook and the Reservoir 1 model from the Tutorial module. It shows how to link a value from Excel to the Holding Tank’s “Initial con- tents” parameter.
In Excel:
Open a new workbook.
Enter the value 10 at row 1, column 1. Save the workbook as My Workbook.
☞ The workbook must be named and saved before the data is copied. Copy the value (10) from cell; this places a 10 in the Clipboard. Leave the Excel workbook open!
In ExtendSim:
Open the Reservoir 1 model located at \ExtendSim9\Examples\Tutorials.
So that you don’t overwrite the original file, save the model as ReservoirHotLink.
In the Holding Tank block, click in the Initial contents parameter field.
Give the command Edit > Paste DDE Link. A yellow outline appears around the param- eter field, indicating that the link has been created.
In the Holding Tank’s dialog, click OK to save changes and close the dialog.
When you open the Holding Tank’s dialog, the number 10 is in its Initial contents field. Mous-
ing over the field shows the location of the originating data.
How to create a DDE link from ExtendSim
To export data from an ExtendSim model to another application: In ExtendSim:
Open a model.
Select the dialog parameter or data table values you want linked. Select Edit > Copy.
Refer to the other application’s documentation to determine how to create a DDE link. Typ- ically, you would choose Paste Special or Paste Link from the client application’s Edit menu.
Any changes made to the parameter in ExtendSim will now be reflected in the other applica- tion. To remove the link, refer to the other application’s documentation.
How To

   769   770   771   772   773