SetMissingValue
Set the missing value of the DataObejct.
BOOL SetMissingValue( LPVOID pVal = NULL )
True for success; otherwise false.
EX1
void DataObject_SetMissingValue_Ex1() { WorksheetPage wksPage; wksPage.Create("origin"); Worksheet wks = wksPage.Layers(); Column col(wks, 0); if(col) { vector& vec = col.GetDataObject(); double dMissing = 1e-10; // defined by user vec.Data(1, 10, 1); vec[0] = dMissing; bool bb = col.SetMissingValue(&dMissing); Dataset ds(col); if(bb && ds.GetSize() > 0 && is_equal(dMissing, ds[0]) ) printf("Fill in missing values to col %s successfully.\n", col.GetName()); else printf("Fail to set missing!\n"); } }
EX2
void DataObject_SetMissingValue_Ex2() { MatrixPage mp; mp.Create("origin"); MatrixLayer ml = Project.ActiveLayer(); if ( !ml ) { printf("Can not access active matrixsheet"); return; } MatrixObject mo = ml.MatrixObjects(0); //get first matrixobject double dMiss = 1e-12; mo.SetMissingValue(&dMiss); if ( mo.GetMissingValue(&dMiss) ) printf("Missing value in this matrixobject is set as %.15lf\n", dMiss); }
DataObject::GetMissingValue
origin.h