DADiSP Worksheet Functions > Function Categories > ActiveX > Automation Server > GETSERIES

 

GETSERIES

Purpose:

Retrieves data from a command, Window or variable as a SafeArray from DADiSP’s ActiveX Automation Server.

Syntax:

[out] INT result = GetSeries(

[in] BSTR "name", [in, out] SAFEARRAY(double) *data)

"name"

-

A string, a variable or the name of the source Window or variable to retrieve.

data

-

A SafeArray, the destination array.

Returns:

An integer, 1 if successful.

Example:

Visual Basic Example:

 

Dim DADiSP as Object

Dim VBData(1000) as Double

Dim Result() as Double

 

’’’ Create VB data array

For i = 0 To 1000

    VBData(i) = Rnd() 

Next i

 

’’’ Connect to DADiSP

Set DADiSP = CreateObject("dadisp.application")

 

’’’ Create a 2 Window Worksheet without prompting

Call DADiSP.Execute("newworksheet(2, 0)")

 

’’’ Put VB array in W1

Call DADiSP.PutSeries("W1", VBData)

 

’’’ Label W1

Call DADiSP.Execute("label(W1, 'Data from Visual Basic')")

 

’’’ get integral of W1

Call DADiSP.GetSeries("integ(W1)", Result)

 

’’’ show it

DADiSP.Visible = 1

 

 

Starts DADiSP as an ActiveX Automation server, creates a 2 Window Worksheet and places 1001 random samples from Visual Basic into W1. The Window is labeled and the SafeArray Result is a 1001x1 array containing the integration of the random data..

Remarks:

If the SafeArray is empty, GetSeries creates an array of the appropriate size. An empty array can be specified in Visual Basic with a declaration such as:

 

Dim MyArray() as Double

 

If the SafeArray has been allocated, the array is filled only up to the number of allocated rows and columns.

 

If the data is complex, alternate columns contain the imaginary or phase component of the array. See GETCOMPLEXSERIES to return complex data.

 

GetSeries explicitly retrieves the data as a SafeArray. See GETDATA to return a variant data type.

See Also:

CALCULATE

CASTVARIANTARRAY

EVALUATE

GETCHARARRAY

GETCOMPLEXDATA

GETCOMPLEXSERIES

PUTCHARARRAY

PUTCOMPLEXDATA

PUTCOMPLEXSERIES

PUTDATA

PUTFULLMATRIX

PUTSERIES

 

GETSERIES

Purpose:

Returns the nth column of a table which is equivalent to the nth series of an overplotted Window.

Syntax:

GETSERIES(series, colnum)

series

-

A series or table.

colnum

-

An integer. The column number.

Returns:

A series.

Example:

W1: ravel(gline(100, 1, 1, 1), 10)

W2: getseries(W1, 3)

 

returns a series in Window 2 consisting of the numbers 21 through 30, which is the third column of Window 1.

 

getseries(W1, 4)

 

returns the fourth column or third overplot(i.e., the fourth series) in Window 1.

Remarks:

Works on Real and Complex series.

See Also:

COL

GETITEM

OVERLAY

OVERPLOT

ROW