Hello,
I am using version 2.6 of the ArcGIS Pro SDK to develop a custom MapTool for a line feature, and I seem to be having trouble setting a symbol for the feedback. Here is some relevant code:
In the constructor, I have these parameters set:
IsSketchTool = true;
SketchType = SketchGeometryType.Line;
SketchOutputMode = SketchOutputMode.Map;
UseSnapping = true;
IsWYSIWYG = true;
SketchMode = SketchMode.Line;
In the OnToolActivateAsync method of my class I then set the symbol (after defining it) by calling:
SketchSymbol = _lineSymbolReference;
_lineSymbolReference is defined as:
CIMSymbolReference _lineSymbolReference = await QueuedTask.Run(() => {
CIMColor lineColor = CIMColor.CreateRGBColor(237, 28, 36);
CIMLineSymbol lineSymbol = SymbolFactory.Instance.ConstructLineSymbol(lineColor, 1.5, SimpleLineStyle.Solid);
return lineSymbol.MakeSymbolReference();
});
When testing the tool in Pro, and drawing a sketch, the symbol always remains as the default symbol (the black dotted line, with the vertex symbols visible), though the symbol appears correctly after the sketch is finished. Is there a way to have the symbol be used when drawing the sketch?
Thank you in advance for any help you might be able to provide!