what do you mean by "and wait for user to add feature"?
Yes, you're right! 🙂 I want to create vertex by adding it to the polyline feature's geometry (Edit Sketch Property table).
I figure out how to insert it but it only works if I have already double click on the line to select it in ArcMap. I want codes to double click to select instead.
Where is a good place that you usually search beside ArcGIS Developer page?
Thanks for all the help, James.
This code will only select it as a normal select. I try this already. It doesn't get me into Edit Sketch mode where I would see all the existing vertices of the polylines.
Hi James,
I think here is the sequence of what needed to happen for my code:
1. Select the line feature - I got this
2. Retrieve the selected feature's geometry and pass it to EditSketch - not yet
3. Add/Insert my X,Y Coordinates into its geometry - know how to do
So, I guess I need to work on the codes for step 2. Do you happen to have this code?
Thanks!
Private Sub btnDrawTarget_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDrawTarget.Click Dim pEditTask As ESRI.ArcGIS.Editor.IEditTask GetEditorReference() startEditing(pEditor) If m_flag2 = True Then SetEvents() pEditTask = GetEditTaskByName(pEditor, "Modify Feature") '<-------change this From "Create New Features" pEditor.CurrentTask = pEditTask End If End Sub
Hi James,
I tried to compile to code. There is an error saying 'GetEditTaskByName' not defined. Any idea?
Public Function GetEditTaskByName(ByRef pEditor As ESRI.ArcGIS.Editor.IEditor, ByRef strEditTaskName As String) As ESRI.ArcGIS.Editor.IEditTask Dim i As Integer For i = 0 To pEditor.TaskCount - 1 If UCase(pEditor.Task(i).Name) = UCase(strEditTaskName) Then GetEditTaskByName = pEditor.Task(i) Exit For End If Next i End Function