2.2.4.18.2 GraphObject::GetNumOfNodes

Description

Get number of nodes of a graph object in graph layer

Syntax

int GetNumOfNodes( )

Parameters

Return

Number of Nodes

Examples

EX1

// For this example to run, a graph window must exist in the project
// and have a rectangle object in it.
void GraphObject_GetNumOfNodes_ex1()
{
	GraphLayer gl = Project.ActiveLayer();
	foreach(GraphObject gr in gl.GraphObjects)
	{
		fpoint ptNode;
		int iNodes = gr.GetNumOfNodes();
		if (iNodes > 1 )
		{
			printf("Name = %s\n", gr.GetName());
			printf("Number of nodes = %d\n", iNodes);
			for (int ii = 0; ii < iNodes; ii ++)
			{
				gr.GetNode(ii,ptNode);
				printf("Point %d: X= %f Y = %f\n", ii, ptNode.x, ptNode.y);
			}
		}
	}        
}

Remark

See Also

Header to Include

origin.h