2.2.4.8.11 DataPlot::GetDataRange

Description

Get Data Range for this data plot.

Syntax

BOOL GetDataRange( DataRange & dr, int i1 = 0, int i2 = -1, int nDefaultDesig = OKDATAOBJ_DESIGNATION_INVALID )

Parameters

dr
[output] The Datarange that receives the datarange. You may also passing derived classes like XYRange
i1
[input] index of the leftmost point
i2
[intput] index of the rightmost point
nDefaultDesig
[intput] Default Designation

Return

TRUE if success, otherwise FALSE.

Examples

//The following code shows how to get the X column from an XY type of plot:
void findxCol(int nPlot = 0)
{
	GraphLayer gl = Project.ActiveLayer();
	DataPlot dp = gl.DataPlots(nPlot);
	XYRange xy;
	Column cx;
	if(dp.GetDataRange(xy) && xy.GetXColumn(cx))
	{
		string str = cx.GetName();
		printf("Plot %d has X column = %s\n", nPlot+1, str);
	}
}

Remark

See Also

Header to Include

origin.h