To get X column of XYRange
BOOL GetXColumn( Column & col, int nIndex = 0, int* pr1 = NULL, int* pr2 = NULL)
TRUE if success.
EX1
//Asume there are three columns of data in the active worksheet. //Output the sum value of X column data. void XYRange_GetXColumn_Ex1() { Worksheet wks; wks= Project.ActiveLayer(); XYRange xyData; if( wks ) { xyData.Add("X", wks, 0, 0, -1, 0); xyData.Add("Y", wks, 0, 1, -1, 1); xyData.Add("ED", wks, 0, 2, -1, 2); Column colX; int nIndex = 0; xyData.GetXColumn(colX, nIndex); vectorbase &vv = colX.GetDataObject(); double dd; vv.Sum(dd); printf("sum of vector is %f\n", dd); } }
XYRange::GetYColumn, XYRange::GetErrColumn
origin.h