I tried to use IFeatureCursorBuffer to create and dissolve the buffered features.I am trying to get the solution since some days using dissolve and UnionOverlappingBuffers, but not being able to get it.
Dim bc As IFeatureCursorBuffer
Dim bgpp As IBasicGeoprocessor
Dim ptempDS As IDatasetName
Dim ds As IDataset
Dim DissolveBufferLayer As IFeatureLayer
Dim pNewWSName As IWorkspaceName
Dim pdatasetname2 As IDatasetName
Dim tbl As ITable
Dim pfeatureclassname As IFeatureClassName
Dim BufferLayerName As String
Dim BufferLayer As IFeatureLayer
Set bc = New FeatureCursorBuffer
bc.PolygonBufferType = esriBufferOutsideIncludeInside
Set bc.featureCursor = BufferLayer.featureClass.update(Nothing, False)
Set bc.spatialReference = TTMap.spatialReference
bc.FieldDistance = BufferDistsanceInMeters
bc.Units(TTMap.MapUnits) = esriMeters
**bc.Dissolve = True**
Set bgpp = New BasicGeoprocessor
BufferLayerName = "DISSOLVE_" & BufferLayerName
CreateShapefile esriGeometryPolygon, ExportFolderPath, BufferLayerName, True
Set DissolveBufferLayer = GetLayerfromLayerName(BufferLayerName)
Set pfeatureclassname = New FeatureClassName
With pfeatureclassname
.FeatureType = esriFeatureType.esriFTSimple
.shapeFieldName = "Shape"
.ShapeType = BufferLayer.featureClass.ShapeType
End With
Set pNewWSName = New WorkspaceName
pNewWSName.WorkspaceFactoryProgID = "esriCore.ShapefileWorkspaceFactory.1"
pNewWSName.PathName = ExportFolderPath & "\"
Set pdatasetname2 = pfeatureclassname
pdatasetname2.Name = DissolveBufferLayer.Name
Set pdatasetname2.WorkspaceName = pNewWSName
Set tbl = BufferLayer.featureClass
Set ds = tbl
Set ptempDS = ds.FullName
If Not tbl Is Nothing Then
Set newtbl = BufferLayer.featureClass
Set newtbl = bgpp.Dissolve(tbl, False, "ID", "ID", pdatasetname2)
End If
TTMxdoc.UpdateContents
TTMxdoc.activeView.Refresh
On Error GoTo 0
Exit Function