External Interfaces/API    

Dynamic Data Exchange (DDE)

MATLAB provides functions that enable MATLAB to access other Windows applications and for other Windows applications to access MATLAB in a wide range of contexts. These functions use dynamic data exchange (DDE), software that allows Microsoft Windows applications to communicate with each other by exchanging data.

This section describes using DDE in MATLAB:

DDE Concepts and Terminology

Applications communicate with each other by establishing a DDE conversation. The application that initiates the conversation is called the client. The application that responds to the client application is called the server.

When a client application initiates a DDE conversation, it must identify two DDE parameters that are defined by the server:

When a server application receives a request for a conversation involving a supported topic, it acknowledges the request, establishing a DDE conversation. The combination of a service and a topic identifies a conversation uniquely. The service or topic cannot be changed for the duration of the conversation, although the service can maintain more than one conversation.

During a DDE conversation, the client and server applications exchange data concerning items. An item is a reference to data that is meaningful to both applications in a conversation. Either application can change the item during a conversation. These concepts are discussed in more detail below.

The Service Name

Every application that can be a DDE server has a unique service name. The service name is usually the application's executable filename without any extension. Service names are not case sensitive. Here are some commonly used service names:

For the service names of other Windows applications, refer to the application documentation.

The Topic

The topic defines the subject of a DDE conversation and is usually meaningful to both the client and server applications. Topic names are not case sensitive. MATLAB topics are System and Engine and are discussed in Accessing MATLAB as a Server. Most applications support the System topic and at least one other topic. Consult your application documentation for information about supported topics.

The Item

Each topic supports one or more items. An item identifies the data being passed during the DDE conversation. Case sensitivity of items depends on the application. MATLAB Engine items are case sensitive if they refer to matrices because matrix names are case sensitive.

Clipboard Formats

DDE uses the Windows clipboard formats for formatting data sent between applications. As a client, MATLAB supports only Text format. As a server, MATLAB supports Text, Metafilepict, and XLTable formats, described below:


  Using MATLAB as a DCOM Server Accessing MATLAB as a Server