I am trying to get the user to draw a line (only 2 vertices) on the screen (just like the georeferencing link/spatial adjustment link).
I got the below snippet from Esri website which does give me a polyline but it requires the user to double click to finish the sketch.
public IPolyline GetPolylineFromMouseClicks(IActiveView activeView) { IScreenDisplay screenDisplay = activeView.ScreenDisplay; IRubberBand rubberBand = new RubberLineClass(); IGeometry geometry = rubberBand.TrackNew(screenDisplay, null); IPolyline polyline = (IPolyline)geometry; return polyline; }I would like the tool to finish the drawing as soon as two points are clicked, thus avoiding a double click.
Can somebody help me on this?
أكثر...
I got the below snippet from Esri website which does give me a polyline but it requires the user to double click to finish the sketch.
public IPolyline GetPolylineFromMouseClicks(IActiveView activeView) { IScreenDisplay screenDisplay = activeView.ScreenDisplay; IRubberBand rubberBand = new RubberLineClass(); IGeometry geometry = rubberBand.TrackNew(screenDisplay, null); IPolyline polyline = (IPolyline)geometry; return polyline; }I would like the tool to finish the drawing as soon as two points are clicked, thus avoiding a double click.
Can somebody help me on this?
أكثر...