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

 

GETCHARARRAY

Purpose:

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

Syntax:

[out] BSTR result = GetCharArray(

[in] BSTR "command", [in] BSTR "workspace")

"command"

-

A string, a command or the name of a Window or variable.

"workspace"

-

A string, the name of the Workspace. Currently unused.

Returns:

A string.

Example:

Visual Basic Example:

 

Dim DADiSP as Object

Dim Result1 as String

Dim Result2 as String

 

’’’ 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.GetCharArray("version", "base")

 

’’’ get range of W1 as a string

Result2 = DADiSP.GetCharArray("max(W1) – min(W1)", "base")

 

’’’ 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 string Result1 contains the current version number of DADiSP. Result2 contains the range of W1 as a string.

Remarks:

Any DADiSP command can be executed or the contents of any Window or variable can be retrieved. The result is always converted into a string.

 

GetCharArray always returns a string. See GETSERIES to explicitly return a SafeArray.

 

See GETDATA to return a data type determined by the data.

See Also:

CALCULATE

EVALUATE

GETDATA

GETFULLMATRIX

GETSERIES

PUTCHARARRAY

PUTDATA

PUTFULLMATRIX

PUTSERIES