GetDataPlot
get a DataPlot from the GroupPlot. The object is referred to by index.
DataPlot GetDataPlot( int nIndex )
void GroupPlot_GetDataPlot_Ex1() { //assume the active graphlayer has at least two dataplots on it GraphLayer gl = Project.ActiveLayer(); if ( !gl ) { printf("Can not get active graphlayer!"); return; } if ( !gl.Groups(0) && !gl.GroupPlots(0, gl.DataPlots.Count()) ) //if never grouped, group them { printf("Fail to group all plots on graphlayer!"); return; } GroupPlot gPlot = gl.Groups(0); //get first groupplot object int nMiddle = (0 + gPlot.GetCount())/2; DataPlot dp = gPlot.GetDataPlot(nMiddle); //get the middle of all dataplots if ( dp ) { printf("The %dth DataPlot is %s", nMiddle, dp.GetDatasetName()); } return; }
origin.h