Remove related dataset
BOOL RemoveRelatedDataset( LPCSTR lpcszName = NULL )
TRUE if successful, otherwise FALSE
EX1
//assume there is a "[Book1]Sheet1" WorkSheet //and a graph plot active void DataPlot_RemoveRelatedDataset_Ex1() { GraphLayer gl = Project.ActiveLayer(); if( gl ) { DataPlot dp = gl.DataPlots(); Worksheet wks("[Book1]Sheet1"); DatasetObject dsObject1 = wks.Columns(0); DatasetObject dsObject2 = wks.Columns(1); if( dp && dsObject1 && dsObject2) { string strDataset1 = "RelatedDataset1"; string strDataset2 = "RelatedDataset2"; int nRet = dp.SetRelatedDataset(strDataset1, dsObject1); nRet = dp.SetRelatedDataset(strDataset2, dsObject2); vector<string> arrNames; dp.GetRelatedDatasetNames(arrNames); out_str("before remove"); for(int nn = 0; nn < arrNames.GetSize(); nn++) { printf("GetRelatedDatasetNames index of %d: %s\n", nn, arrNames[nn]); } dp.RemoveRelatedDataset(strDataset1); dp.GetRelatedDatasetNames(arrNames); out_str("after remove"); for(nn = 0; nn < arrNames.GetSize(); nn++) { printf("GetRelatedDatasetNames index of %d: %s\n", nn, arrNames[nn]); } } } }
DataPlot::GetRelatedDatasetNames
origin.h