2.2.4.38.28 Project::GetLTVars

Description

It retrieves the list of all numeric LabTalk variables.

Syntax

int GetLTVars( vector<string> & vsNames, vector<double> & vdValues = NULL, BOOL bUserVarsOnly = TRUE, vector<int> & vnTypes = NULL )

Parameters

vsNames
[output]the vector which will receive the names of all numeric Labtalk variables.
vdValues
[output,optional]the vector which will receive the values of all the numeric Labtalk variables.
bUserVarsOnly
[optional]if TRUE, only user numeric Labtalk variables will be returned, otherwise all
numeric Labtalk variables will be returned
vnTypes
[output,optional]the vector which receives the types of the variables.

Return

the count of the retrieved variables.

Examples

EX1

// The example list all the numeric LabTalk variables currently in the project.
void        Project_GetLTVars_ex1()
{
    vector<string>        vsNames;
    vector                vdValues;
    vector<int>            vnTypes;
    int                    nCount = Project.GetLTVars(vsNames, vdValues, FALSE, vnTypes);
    for (int ii = 0; ii < nCount; ii++)
    {
        printf("name: %s\t type: %d\t value = %lf\n", vsNames[ii], vnTypes[ii], vdValues[ii]);
    }
    
    return;
}

Remark

See Also

Project::GetLTStrVars

Header to Include

origin.h