Get object property via LabTalk property name
int GetProp(LPCSTR lpcszVarName, double * pdVal = NULL)
int GetProp(LPCSTR lpcszVarName, string & str )
EX1
//This example assumes the active graph has a line object void GetProp_Ex() { GraphLayer gl = Project.ActiveLayer(); if( gl.IsValid() ) { GraphObject go; go = gl.GraphObjects("Line"); if( go.IsValid() ) { double vv; int nn = go.GetProp("color", &vv); printf("ret = %d, color = %g\n", nn, vv); out_int("can also directly get integer return value: ", go.GetProp("color")); Tree trColor; trColor=go.GetFormat(FPB_STYLE_COLOR, FOB_OBJECT, TRUE, TRUE); out_int("trColor.Root.Color.nVal=", trColor.Root.Color.nVal); } } }
origin.h