2.2.4.37.4 PolyPolylineGraphObject::GetPoints


Description

Get points along a drawn shape

Syntax

int GetPoints( vector & vX = NULL, vector & vY = NULL, int nIndex = 0 )

Parameters

vX
[output] X coordinates in world units (axis units)
vY
[output] Y coordinates
nIndex
[input] for poly polygon, index of the polygon

Return

Number of points or -1 for error

Examples

EX1

void GetPoints_ex1()
{
	//Assumes active graph layer has some PolyPolylineGraphObject
	GraphLayer gl = Project.ActiveLayer();
	foreach(GraphObject obj in gl.GraphObjects)
	{
		PolyPolylineGraphObject plobj;
		plobj = obj;
		if( !plobj )
			continue;
		
		vector vX, vY;
		int nCount = plobj.GetPoints(vX, vY);
				
		printf("%s has %d points, and the first point is (%g, %g)\n", plobj.GetName(), nCount, vX[0], vY[0]);
	}
}

Remark

See Also

PolyPolylineGraphObject::SetPoints

Header to Included

origin.h