2.2.4.24.19 Layer::LT_evaluate

Description

Evaluate an expression with a specific layer as the active layer.

Syntax

BOOL LT_evaluate( LPCSTR lpcszLabTalkExpression, double * lpdbResult )

Parameters

lpcszLabTalkExpression
[input] Pointer to a string containing the expression in LabTalk syntax.
lpdbResult
[output] Pointer to a double value to receive the results.

Return

TRUE if expression is valid, FALSE if expression leads to missing value

Examples

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");
	
}

Remark

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.

See Also

Header to Include

origin.h

Reference