LT_set_var
Layer-LT_set_var
Set LabTalk variable value with a specific layer as the active layer.
BOOL LT_set_var( LPCSTR lpcszLabTalkVarName, double dbValue )
TRUE if OK, and FALSE if it fails.
EX1
//set the graph layer's height. void Layer_LT_set_var_ex1() { double vv; GraphPage gp; gp.Create("Origin"); GraphLayer gl = gp.Layers(0); gl.LT_get_var("layer.height", &vv); out_double("layer's height is ", vv); vv += 10; // Set the new value: if(gp.LT_set_var("layer.height", vv)) out_str("set layer's height in LabTalk succeeded"); else out_str("set layer's height in LabTalk failed"); gp.LT_get_var("layer.height", &vv); out_double("new value is ", vv); }
It sets the value of a LabTalk variable. 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.
Layer-LT_get_var
origin.h