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 .NET] Public Sub SetGeometries ( _ ByVal Count As Integer, _ ByRef newGeometries As IGeometry _ )
[Java] public void setGeometries ( int Count, IGeometry newGeometries ) throws IOException, AutomationException
[C++] HRESULT SetGeometries( long Count, IGeometry** newGeometries );
Count is a parameter of type long
newGeometries is a parameter of type IGeometry
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.
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)
When using VBNET you must use the IGeometryBridge interface to call this method.