Gets the names of all the datasets that appear in the DataRange.
int GetNamesOfDatasets( vector<string> & vsNames, BOOL bAvoidRepetitions = FALSE )
The total number returned, or a negative value for error.
//Get the four datasets's name in the datarange. void DataRange_GetNumDatasets_Ex1() { //assume the active worksheet has least four columns before run this code. Worksheet wks = Project.ActiveLayer(); if ( !wks ) { printf("Can not find any active worksheet!"); return; } DataRange dr; dr.Create();//init the object dr.Add("X", wks, 0, 0, -1, 0);//Four datasets. dr.Add("Y", wks, 0, 1, -1, 1); dr.Add("Y", wks, 0, 2, -1, 2); dr.Add("Y", wks, 0, 3, -1, 3); vector<string> vsNames; dr.GetNamesOfDatasets(vsNames, true); return; }
origin.h