DDELINK

Purpose:

Retrieves a series item from a DDE conversation whenever the item changes. The DDE channel number is managed internally.

Syntax:

DDELINK(

"app", "topic", "item")

DDELINK(

"app|topic!item", "server", autostart, startmode, datatype, overwrite, autoscale)

"app"

-

A string, the application name.

"topic"

-

Optional. A string, the topic name.

"item"

-

Optional. A string, the item name.

"server"

-

Optional. A string, the name of server executable.

autostart

-

Optional. An integer, start DDE server flag:

0:

Do not start server (default)

1:

Start DDE server

startmode

-

Optional. An integer, start DDE server flag:

0:

Do not start server (default)

1:

Start DDE server

datatype

-

Optional. An integer or name specifying the type of data to retrieve. Defaults to 0, ASCII. The following are valid data types:

Name

Code

Data Type

Range

ASCII

0

Comma/Space delimited data

N/A

SBYTE

1

Signed Byte

-128 to +127

UBYTE

2

Unsigned Byte

0 to 255

BYTE

2

(same as UBYTE)

0 to 255

SINT

3

Signed Integer

-32768 to +32767

UINT

4

Unsigned Integer

0 to 65536

LONG

5

4-byte Signed Integer

-2,147,483,648 to +2,147,483,647

FLOAT

6

4-byte Floating Point

-10^37 to +10^38

DOUBLE

7

8-byte Floating Point

-10^307 to +10^308

overwrite

-

Optional. An integer, the overwrite pervious data mode:

0:

Append new data to existing data (default)

1:

Overwrite existing data with new data.

autoscale

-

Optional. An integer, the plot autoscale mode:

0:

Do not automatically scale the Window to the range of the new data

1:

Autoscale the Window (default)

Returns:

A series representing the value of the item requested.

Example:

ddelink("Excel", "Sheet1", "R1C1:R100C1")

 

establishes a DDE conversation with Excel, returns the value of the cells in row 1, column 1 through row 100 column 1 as a series in the current window. Whenever a cell changes, the new series is appended to the existing series.

Remarks:

Use DDEUNLINK to terminate a DDELINK operation. The "app", optional "topic" and optional "item" strings can also be placed in one string of the following Syntax: "app|topic!item". For example:

ddelink("Excel|Sheet1!R1C1:R100C1")

 

DDELINK combines DDEINIT and DDEADVISE into one function. See DDEINIT and DDEADVISE for a discussion of the optional arguments.

See Also:

DDEADVISE

DDEEXECUTE

DDEGETDATA

DDEINITIATE

DDEUNLINK