Get related dataset.
BOOL GetRelatedDataset( LPCSTR lpcszName, DatasetObject & dsObject )
TRUE if success, otherwise FALSE
EX1
//assume there is a "[Book1]Sheet1" WorkSheet //and a graph plot active void DataPlot_GetRelatedDataset_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::SetRelatedDataset
origin.h