Get the index of the selected data plot in the active graph layer.
int get_selected_data_plot()
None.
Return the index of the selected data plot if successful.
Returns -1 means no selected data plot, then return the index of the active one.
Returns -2 means the active window is not graph.
EX1
// Before running, plot a data on graph, and click on the data plot to select void get_selected_data_plot_ex1() { int nPlotIndex = get_selected_data_plot(); if( nPlotIndex >= 0 ) { GraphLayer gl = Project.ActiveLayer(); DataPlot dp = gl.DataPlots(nPlotIndex); string str; if( dp.GetRangeString(str) ) out_str(str); } }
GraphLayer::DataPlots(-1) returns the index of the active data plot, but this function returns the selected data plot, the result of two functions is different.
GraphLayer::DataPlots
origin.h