ArcObjects Library Reference  (Geometry)    

IGeometryCollection.InsertGeometries Method

Inserts at the specified index references to some number of geometries in the input array. This method is intended for internal use only.

[Visual Basic 6.0]
Sub InsertGeometries(
    ByVal Index As Long, _
    ByVal Count As Long, _
    newGeometries As IGeometry _
)
[Visual Basic .NET]
Public Sub InsertGeometries ( _
    ByVal Index As Integer, _
    ByVal Count As Integer, _
    ByRef newGeometries As IGeometry _
)
[C#]
public void InsertGeometries (
    int Index,
    int Count,
    ref IGeometry newGeometries
);
[Java]
public void insertGeometries (
    int Index,
    int Count,
    IGeometry newGeometries
)
throws
    IOException,
    AutomationException
[C++]
HRESULT InsertGeometries(
  long Index,
  long Count,
  IGeometry** newGeometries
);
[C++]

Parameters

Index

  Index is a parameter of type long

Count

  Count is a parameter of type long

newGeometries [in]

  newGeometries is a parameter of type IGeometry

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The geometries are inserted before the ith (index) element in the list. Use an array of geometries and give the exact number (count ) of elements in the array. A too large value for the count parameter causes exceeding the boundary of the array and will cause an application error. To place the geometries last in the collection then use the addGeometries method.

 

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic 6.0]

VB Example:

  Dim pPt(0 To 1) As IPoint

Dim p1 As IPoint, p2 As IPoint
Set p1 = New point: Set p2 = New point
p1.PutCoords 1000, 1000
p2.PutCoords 2000, 2000
Set pPt(0) = p1
Set pPt(1) = p2
m_pGeoColl.InsertGeometries 3, 2, pPt(0)
[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

See Also

IGeometryCollection Interface

Example

IGeometryBridge_InsertGeometries_Example