This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryBridge Interface > IGeometryBridge.AddGeometries Method (ArcObjects .NET 10.5 SDK) |
Adds references to the specified geometries.
[Visual Basic .NET] Public Sub AddGeometries ( _ ByVal pGeometryCollection As IGeometryCollection, _ ByRef newGeometries As IGeometry[] _ )
[C#] public void AddGeometries ( IGeometryCollection pGeometryCollection, ref IGeometry[] newGeometries );
[C++]
HRESULT AddGeometries(
IGeometryCollection* pGeometryCollection,
Array* newGeometries
);
[C++]
Parameters pGeometryCollection [in]
pGeometryCollection is a parameter of type IGeometryCollection newGeometries [in] newGeometries is a parameter of type Array
All development languages compatible version of IGeometryCollection::AddGeometries .
public void AddGeometries()
{
IPoint point1=new PointClass();
point1.PutCoords(10, 10);
IPoint point2=new PointClass();
point2.PutCoords(20, 20);
IGeometry[] geometryArray=new IGeometry[2];
geometryArray[0]=point1 as IGeometry;
geometryArray[1]=point2 as IGeometry;
//add geometries
IGeometryCollection geometryCollection=new MultipointClass();
IGeometryBridge geometryBridge=new GeometryEnvironmentClass();
geometryBridge.AddGeometries(geometryCollection, ref geometryArray);
}