I am trying to symbolize a rubberband tracker as it is drawing. The default symbol is a simple black line. When setting the symbol of the line in the ScreenDisplay method and and calling DrawPolyline, the symbol I have set does appear but this is after the draw has completed.
I would like to have the symbol I set be shown once a single point has been created (while its tracking the next point), not just when the construction of the line has completed.
This functionality seems to be possible as I can easily do it in ArcMap - I can select any symbol and then create a new line feature and it displays the selected symbol while I draw it.
Edit: I noticed that it doesn't refresh as cleanly as the built in ArcMap tools do either. Strange, could there be some side effect happening? I've added two clips of what I experience and what I would like to have happen and exactly how I would like the line to look.
Result from this code:
What I would like:
Relevant Code:
IScreenDisplay screenDisplay = ArcMap.Document.ActiveView.ScreenDisplay;
screenDisplay.StartDrawing(screenDisplay.hDC, (int)esriScreenCache.esriNoScreenCache);
// Custom symbol I create gets cast as ISymbol...
ISymbol symbol = (ISymbol)cartographicLineSymbol;
IRubberBand2 rubberBand = new RubberLineClass();
ICurve2 rubberLine = (ICurve2)rubberBand.TrackNew(screenDisplay, symbol);
screenDisplay.SetSymbol(symbol);
screenDisplay.DrawPolyline(rubberLine);
screenDisplay.FinishDrawing();
ISymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen
? gis.stackexchange.com/questions/13926/… – Kirk Kuykendall Sep 4 '18 at 22:39