2.2.3.19.17 vectorbase::GetLabTalkVectorValue

Description

Assigns a LabTalk vector to an Origin C vector.

Syntax

BOOL GetLabTalkVectorValue( LPCTSTR lpcszLabTalkVector )

Parameters

lpcszLabTalkVector
[input] name of LabTalk vector

Return

Returns TRUE on success and FALSE on failure.

Examples

EX1

// Call this function with a worksheet active

void vectorbase_GetLabTalkVectorValue_ex1()
{
    // The LabTalk vector wks.cname1$, wks.cname2$ etc holds the names
    // of the curren worksheet columns 1, 2 etc.
    // Declare a string vector and get the wks.cname LabTalk vector
    vector<string> vecColumnName;
    if( vecColumnName.GetLabTalkVectorValue("wks.cname") )
    {
        int iSize = vecColumnName.GetSize();
        printf("The worksheet has %d columns with the following names:\n", iSize);
        for( int ii = 0; ii < iSize; ii++ )
            printf("   %s\n", vecColumnName[ii]);
    }
    else
        out_str("Could not get values from LabTalk vector wks.cname");
}

Remark

Get contents of a LabTalk vector to this Origin C vector.

See Also

vectorbase::SetLabTalkVectorValue

Header to Include

origin.h