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
//Get the index of the graph layer.
GraphLayer gl = gp.Layers(1);
//output the index of the layer.(0-based)
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.