GETDATA

Purpose:

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

Syntax:

[out] VARIANT result = GetData(

[in] BSTR "command")

"command"

-

A string, a command or Window or variable name.

Returns:

A variant, either a string, scalar or array.

Example:

Visual Basic Example:

 

Dim DADiSP as Object

Dim Result1 as Variant

Dim Result2 as Variant

 

’’’ Connect to DADiSP

Set DADiSP = CreateObject("dadisp.application")

 

’’’ Create a 2 Window Worksheet without prompting

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

 

’’’ Generate random data in W1

Call DADiSP.Execute("W1: grand(1000, 1)")

 

’’’ get version

Result1 = DADiSP.GetData("version")

 

’’’ get integral of W1

Result2 = DADiSP.GetData("integ(W1)")

 

’’’ show it

DADiSP.Visible = 1

 

 

Starts DADiSP as an ActiveX Automation server, creates a 2 Window Worksheet and places 1000 random samples in W1. The variant Result1 is a string containing the current version number of DADiSP. The variant Result2 is an 1000x1 array containing the integration of the random data..

Remarks:

Any DADiSP command can be executed or the contents of any Window or variable can be retrieved.

 

GetData always returns a variant. The variant type is automatically determined by the data. See GETVARIANTDATA to return a variant of a specified type.

 

See GETSERIES to explicitly return a SafeArray.

 

See GETCHARARRAY to explicitly return a string.

 

See CASTVARIANTARRAY to return a series as an array of variants.

See Also:

CALCULATE

CASTVARIANTARRAY

EVALUATE

GETCHARARRAY

GETCOMPLEXDATA

GETCOMPLEXSERIES

GETFULLMATRIX

GETSERIES

PUTCHARARRAY

PUTDATA

PUTFULLMATRIX

PUTSERIES