Hi everyone,
I am trying to run the IPolygon.SplitAtPoint method in this code. But I get a runtime-error:
"The specified splitting distance is not included in the curve to be split."
I am trying to insert new vertex in polygon features. Any idea??? Thanks!!!
Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument
Dim pMap As IMap
Set pMap = pMxDoc.FocusMap
Dim pFLayer As IFeatureLayer
Set pFLayer = pMap.Layer(0)
Dim pFeatClass As IFeatureClass
Set pFeatClass = pFLayer.FeatureClass
Dim pPointLayer As IFeatureLayer
Set pPointLayer = pMap.Layer(1)
Dim pFCPoint As IFeatureClass
Set pFCPoint = pPointLayer.FeatureClass
For i = 0 To pFeatClass.FeatureCount(Nothing)
Dim pFeat As IFeature
Set pFeat = pFeatClass.GetFeature(i)
Dim pPoly As IPolygon
Set pPoly = pFeat.Shape
For j = 0 To pFCPoint.FeatureCount(Nothing)
Dim pFPoint As IFeature
Set pFPoint = pFCPoint.GetFeature(j)
Dim pPColl As IPointCollection
Set pPColl = pFPoint.Shape
Dim pPoint As IPoint
Set pPoint = pPColl.Point(0)
Dim path As Long
Dim ring As Long
pPoly.SplitAtPoint pPoint, False, False, False, path, ring => Runtime errorr!!!
Next
Next