This document is archived and information here might be outdated. Recommended version. |
Adds vertices to this Path, Ring, Polyline, or Polygon, or adds new points to this Multipoint, Triangles, TriangleFan, or TriangleStrip.
[Visual Basic .NET] Public Sub AddWKSPoints ( _ ByVal pPointCollection As IPointCollection4, _ ByRef pointStructures As WKSPoint[] _ )
[C#] public void AddWKSPoints ( IPointCollection4 pPointCollection, ref WKSPoint[] pointStructures );
[C++]
HRESULT AddWKSPoints(
IPointCollection4* pPointCollection,
SAFEARRAY(WKSPoint)* pointStructures
);
[C++]
Parameters pPointCollection [in]
pPointCollection is a parameter of type IPointCollection4* pointStructures [in]
pointStructures is a parameter of type SAFEARRAY(WKSPoint)*
public void AddWKSPoints()
{
int length=10;
WKSPoint[] pointArray=new WKSPoint[length];
for (int i=0; i < length; i++)
{
pointArray[i]=new WKSPoint();
pointArray[i].X=i * 10;
pointArray[i].Y=i * 10;
}
IPointCollection4 pointCollection=new MultipointClass();
//adds WKSpointZs to pointCollection
IGeometryBridge2 geometryBridge=new GeometryEnvironmentClass();
geometryBridge.AddWKSPoints(pointCollection, ref pointArray);
System.Windows.Forms.MessageBox.Show(pointCollection.PointCount + " Points added");
}