GetPlotType
Get DataPlot type and also to get all the description strings.
int GetPlotType( DataPlotStrings * pDescStrs = NULL, BASIC_PLOT_SETTINGS * pstPlotSettings = NULL )
-1 if DataPlot is not a valid plot object, otherwise returns the plot type ID of one of the below value
void DataPlot_GetPlotType_Ex1() { //make sure there exists a graph with dataplots on it before running this code. GraphLayer gl = Project.ActiveLayer(); if ( gl ) { DataPlot dp = gl.DataPlots(0); //get the first dataplot on graphlayer if( dp ) { DataPlotStrings stDescStrs; int nPlotType = dp.GetPlotType(&stDescStrs); //returns integer value like IDM_PLOT_DOT, IDM_PLOT_LINE, IDM_PLOT_3D_LINE, etc. if ( nPlotType > 0 ) { printf("PlotType of DataPlot %s is %d\n", stDescStrs.szY, nPlotType); } } else { printf("DataPlot is not a valid object"); } } }
origin.h