ArcObjects Library Reference  (Geometry)    

IGeometryCollection.AddGeometries Method

Adds references to the specified geometries. This method is intended for internal use only.

[Visual Basic 6.0]
Sub AddGeometries(
    ByVal Count As Long, _
    newGeometries As IGeometry _
[Visual Basic .NET]
Public Sub AddGeometries ( _
    ByVal Count As Integer, _
    ByRef newGeometries As IGeometry _
public void AddGeometries (
    int Count,
    ref IGeometry newGeometries
public void addGeometries (
    int Count,
    IGeometry newGeometries
HRESULT AddGeometries(
  long Count,
  IGeometry** newGeometries



  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.


The geometries are added last in the list. Use an array of geometries (IGeometry) and the exact number (count ) of elements in the array. Exceeding the boundary of the array will cause an application error. If you don't want to place the geometries last in the collection then use the InsertGeometries method.


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 IGeometry

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.AddGeometries 2, pPt(0)
[Visual Basic .NET]

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

See Also

IGeometryCollection Interface