DDEADVISE

Purpose:

Automatically retrieves a series item from a DDE conversation whenever the item changes.

Syntax:

DDEADVISE(chan, datatype, overwrite, autoscale, "item")

chan

-

An integer, the DDE channel number returned by DDEINITIATE.

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)

"item"

-

 A string, the item to retrieve.

Returns:

A series representing the value of the item requested.

Example:

chan = ddeinit("Excel", "Sheet1")
ddeadvise(chan, "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:

If overwrite is set to 1, the new data overwrites the existing data. If autoscale is set to 0, the window scales do not automatically adjust to fit the range of the new data.

 

Use DDEUNADVISE to terminate a DDEADVISE operation.

 

DDEADVISE uses an explicit DDE channel number.

 

DDELINK is similar to DDEADVISE but the channel number is managed internally.

See Also:

DDEEXECUTE

DDEGETDATA

DDELINK

DDEUNADVISE