Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, Triangles, TriangleFan, TriangleStrip, or MultiPatch.
[Visual Basic .NET] Public Sub InsertWKSPointZs ( _ ByVal pPointCollection As IPointCollection4, _ ByVal Index As Integer, _ ByRef newPoints As WKSPointZ[] _ )
[C#] public void InsertWKSPointZs ( IPointCollection4 pPointCollection, int Index, ref WKSPointZ[] newPoints );
[C++]
HRESULT InsertWKSPointZs(
IPointCollection4* pPointCollection,
long Index,
Array* newPoints
);
[C++]Parameters
pPointCollection [in]pPointCollection is a parameter of type IPointCollection4
Index Index is a parameter of type long newPoints [in] newPoints is a parameter of type Array
Product Availability
Description
All development languages compatible version of IPointCollection4::InsertWKSPointsZs .
public static void InsertWKSPointZs()
{
int length = 10;
WKSPointZ[] pointArray = new WKSPointZ[length];
for (int i = 0; i < length; i++)
{
pointArray[i] = new WKSPointZ();
pointArray[i].X = i * 10;
pointArray[i].Y = i * 10;
pointArray[i].Z = i * 10;
}
IPointCollection4 pointCollection = new MultipointClass();
// Make pointcollection ZAware
IZAware zAware = (IZAware)pointCollection;
zAware.ZAware = true;
//add points to pointCollection
IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
geometryBridge.AddWKSPointZs(pointCollection, ref pointArray);
//insert points
int secondArrayLength = 5;
WKSPointZ[] secondPointArray = new WKSPointZ[secondArrayLength];
for (int i = 0; i < secondArrayLength; i++)
{
secondPointArray[i] = new WKSPointZ();
secondPointArray[i].X = i * 33;
secondPointArray[i].Y = i * 33;
secondPointArray[i].Z = i * 33;
}
int index = 1;
geometryBridge.InsertWKSPointZs(pointCollection, index, ref secondPointArray);
}