LT_get_var
Layer-LT_get_var
Get LabTalk variable value with a specific layer as the active layer.
BOOL LT_get_var( LPCSTR lpcszLabTalkVarName, double * lpdbResult )
TRUE if lpcszLabTalkVarName is a LabTalk variable, and FALSE if it is not
EX1
//Get the index of the graph layer. void Layer_LT_get_var_ex1() { double vv; GraphPage gp; gp.Create("Origin"); gp.AddLayer(); GraphLayer gl = gp.Layers(1); gl.LT_get_var("layer.cindex", &vv); //output the index of the layer.(0-based) out_double("index=", vv); }
You can use this command to get LabTalk variables, including system variables whose names begin with @.
The Layer Object is only temporarily set as the active layer. The Layer that was active before the code executes is restored as active upon return.
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.
Layer::LT_set_var
origin.h