Page::LT_get_var

Description

Get LabTalk variable value temporarily setting this page as the active page.

Syntax

BOOL LT_get_var( LPCSTR lpcszLabTalkVarName, double * lpdbResult )

Parameters

lpcszLabTalkVarName
[input] LabTalk variable name, case insensitive
lpdbResult
[output] the double variable pointed to by lpdbResult recieves the LabTalk variable value

Return

TRUE if lpcszLabTalkVarName is a LabTalk variable, and FALSE if it is not

Examples

EX1

void    Page_LT_get_var_ex1()
{
    double vv;
    GraphPage gp;
    gp.Create("origin");
    if( gp )
    {
        //Output the layers of the graph page.
        int nn = gp.AddLayer("Test");
                gp.LT_get_var("page.nLayers", &vv);
        out_double("vv = ", vv);
    }   
}

Remark

You can use this command to get LabTalk variables, including system variables whose names begin with @.

This command is similar to LT_evaluate but you can tell if given name corresponds to a LabTalk variable even if its value is missing value, while LT_evaluate will not be able to differentiate. Also, using LT_evaluate to get value of a variable is slower.

See Also

Page::LT_set_var

header to Include

origin.h

Reference