Performing dynamic data exchange with DDE

By creating dynamic data exchange (DDE) links, you can share information in one file with several other files, and you need only maintain the original file; the other files are updated automatically. For example, if you store data in an Excel spreadsheet, you can use that data in a diagram. When you update the spreadsheet, Embed automatically updates the data in the diagram when you run a simulation.

You create DDE links by copying a selection from one application (referred to as the source or server) and pasting it into another one (referred to as the destination or client) using the Paste Link or Paste Special command. Before you can create a link, the source file must be saved to disk.

Embed offers three blocks for creating DDE links:

      The DDEsend block, which links source information in a block diagram to another application, such as an Excel or Visual Basic file.

      The DDEreceive block, which links source information in an application file to a block diagram.

      The DDE block, which establishes a two-way link: it acts as both the source (sender) and destination (receiver). For example, a DDE block can send data to a Visual Basic program to work on, and then receive the updated data back from Visual Basic.

You can create DDE links only between Embed and other Windows applications that support DDE linking. Some applications do support DDE links, but do not support creating the links by copying and pasting selections. When this is the case, you can still create a link by entering the link address directly to both the source and destination files.