LT_evaluate
Layer-LT_evaluate
Evaluate an expression with a specific layer as the active layer.
BOOL LT_evaluate( LPCSTR lpcszLabTalkExpression, double * lpdbResult )
TRUE if expression is valid, FALSE if expression leads to missing value
EX1
//Check if the labtalk expression is right. void Layer_LT_evaluate_ex1() { double vv; bool bRet; GraphPage gp; gp.Create("Origin"); GraphLayer gl = gp.Layers(0); bRet = gl.LT_evaluate("layer.height", &vv); if(bRet) out_str("The labtalk expression is valid"); else out_str("The labtalk expression is not valid"); }
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.
origin.h