Set object property via LabTalk property name
int SetProp( LPCSTR lpcszVarName, double dVal )
int SetProp( LPCSTR lpcszVarName, LPCSTR lpcszVal )
Returns 1 if lpcszVarName is a valid name and 0 if it is not. -1 if error occurs
EX1
//This example assumes the active graph has a line object void SetProp_Ex1(int nColor = 0, string strName = "line") { GraphLayer gl = Project.ActiveLayer(); GraphObject grobj; grobj = gl.GraphObjects(strName); double vv; if(grobj) { int nn = grobj.SetProp("color", nColor); out_int("SetProp return: ", nn); out_int("new color: ", grobj.GetProp("color")); } else out_str("no such obj"); }
origin.h