ArcObjects Library Reference  (Geometry)    

IGeometryCollection.SetGeometries Method

Replaces all geometries in the collection with the specified number of references to those in the input array. This method is intended for internal use only.

[Visual Basic 6.0]
Sub SetGeometries(
    ByVal Count As Long, _
    newGeometries As IGeometry _
[Visual Basic .NET]
Public Sub SetGeometries ( _
    ByVal Count As Integer, _
    ByRef newGeometries As IGeometry _
public void SetGeometries (
    int Count,
    ref IGeometry newGeometries
public void setGeometries (
    int Count,
    IGeometry newGeometries
HRESULT SetGeometries(
  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.


SetGeometries is used to reset the references of the geometries within the GeometryCollection . The result is that all references are changed to point only at the geometries contained within the specified array. Note that the GeometryCount changes accordingly also.



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

[Visual Basic 6.0]

VB Example that sets the GeometryCollection m_pGeoColl to reference the 2 points only:

   Dim pPt(0 To 2) As IPoint

Dim p1 As IPoint, p2 As IPoint
Set p1 = New point: Set p2 = New point
p1.PutCoords 1111, 1111
p2.PutCoords 2222, 2222
Set pPt(0) = p1
Set pPt(1) = p2

m_pGeoColl.SetGeometries 2, pPt(0)
[Visual Basic .NET]

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

See Also

IGeometryCollection Interface