I am using arcmap 9.3 and vb.net i need to delete the vertex pragmatically. i have the feature and index of delete vertex but i dont know how to delete the vertex any one give me the sample code for delete vertex. i am using following code its not working.
Function deletevertex(ByVal index As Integer, ByVal pointCollection As IPointCollection)
Dim editorUID As UID
editorUID = New UID
editorUID.Value = "esriEditor.Editor"
Dim editor As IEditor
editor = (papp.FindExtensionByCLSID(editorUID))
Dim editSketch As IEditSketch
If editor Is Nothing Then
editSketch = CType(editor, IEditSketch)
If index = -1 Then
Dim sketchOperation As ISketchOperation
sketchOperation = New SketchOperation
sketchOperation.MenuString_2 = "Delete Vertex"
pointCollection = editSketch.Geometry
above code show the error of
"the index either too small or too large".
If i am select the Feature using "modifying Feature" that time vertex deleted successfully. if i am select the vertex using "new feature creation " that time only the index either too large or too small error showing.