Check the specified DataRange if has been plotted in specified GraphLayer
int check_has_plotted_in_graph( const DataRange & dr, const GraphLayer & gl, vector<int> & vnPlotIndices = NULL, DWORD dwNTypeCntrl = NTYPE_BOOKSHEET_XY_RANGE, bool bResetPlotRowRangeIfDiffButNotChecked = false )
returns number of plots in dr that has been plotted in gl or return negative for error.
//make sure and worksheet with at least two columns exists, named as "[Book1]Sheet1"
//make sure and active graphlayer exists
GraphLayer gl = Project.ActiveLayer();
if ( gl )
string strWksName = "[Book1]Sheet1";
if ( wks )
dr.Add(wks, 0, "X");
dr.Add(wks, 1, "Y");
int nPlots = check_has_plotted_in_graph(dr, gl);
out_int("Number of plots in dr that has been plotted : ", nPlots);