Minimum Origin Version Required: Origin 2016 SR0
Get data points that are inside the enclosed rectangle
int GetRectPoints( fpoint & fptTopLeft, fpoint & fptBottomRight, vector & vX, vector & vY, vector<int> * pvnIndices = NULL )
number of data points found or < 0 for error codes
EX1
void DataPlot_GetRectPoints_Ex1() { GraphLayer gl = Project.ActiveLayer(); if(!gl) return; DataPlot dp = gl.DataPlots(0); if(!dp) return; double left = gl.X.From; double right = gl.X.To; double top = gl.Y.To; double bottom = gl.Y.From; fpoint fptTL(left,top); fpoint fptBR(right,bottom); vector<double> vx, vy; vector<int> vIndex; int nSize = dp.GetRectPoints( fptTL, fptBR, vx, vy, &vIndex ); if(nSize >= 0) printf("data point(s) in view: %d\n", nSize); }
origin.h