Skip the number of points(nSkip) to reduce data for Column or MatrixObject in nStart to nEnd range.
int ReduceSize( int nSkip, DWORD dwCntrl, int nStart = 0, int nEnd = -1, int nBlockSize = 1 )
Return 0 for no error.
EX1
// before running new a worksheet and fill in row numers with two columns void DataObject_ReduceSize_Ex1() { Worksheet wks = Project.ActiveLayer(); if(!wks) return; Column col(wks, 0); if(!col) return; // in 0-10 range, skip one per two items int nSkip = 1; col.ReduceSize(nSkip, DORS_DEL_BEFORE_AFTER, 0, 10, 2); }
EX2
//before run this code, make sure there is an active matrix with row number, use formula Cell(i,j) = i to set value void DataObject_ReduceSize_Ex2() { MatrixLayer ml = Project.ActiveLayer(); if ( !ml ) { printf("Can not access active matrixsheet"); return; } MatrixObject mo = ml.MatrixObjects(0); //get first matrixobject int nSkip = 1; //remove one row after every two rows through the matrix mo.ReduceSize(nSkip, DORS_DEL_BEFORE_AFTER, 0, -1, 2); return; }
origin.h