Get related dataset names array
int GetRelatedDatasetNames( vector<string> & arrNames )
the related dataset names array size;
EX1
//assume there is a "[Book1]Sheet1" WorkSheet //and a graph plot active void DataPlot_GetRelatedDatasetNames_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); for(int nn = 0; nn < arrNames.GetSize(); nn++) { printf("GetRelatedDatasetNames index of %d: %s\n", nn, arrNames[nn]); } } } }
DataPlot::SetRelatedDataset
origin.h