Set related dataset.
int SetRelatedDataset( LPCSTR lpcszName, const DatasetObject & dsObject )
0 if success.
EX1
//assume there is a "[Book1]Sheet1" WorkSheet //and a graph plot active void DataPlot_SetRelatedDataSet_Ex1() { GraphLayer gl = Project.ActiveLayer(); if( gl ) { DataPlot dp = gl.DataPlots(); Worksheet wks("[Book1]Sheet1"); DatasetObject dsObject = wks.Columns(0); if( dp && dsObject) { string strDataset = "RelatedDataset1"; int nRet = dp.SetRelatedDataset(strDataset, dsObject); DatasetObject dsObjectGet; BOOL bSuccess = dp.GetRelatedDataset(strDataset, dsObjectGet); printf("GetRelatedDataset : %s \n", dsObjectGet.GetName()); } } }
DataPlot::GetRelatedDataset
origin.h