Enable snapping without editing

93
2
03-02-2020 12:32 PM
AlexZlotin1
New Contributor II

I have built a custom Pro tool which allows to click the map twice to define a rotation angle and apply it to features with a symbology rotation field. I would like to enable snapping when the tool is activated, the same way the out-of-the-box Measure tool works. Any idea how this can be implemented? Thanks.

0 Kudos
2 Replies
SeanJones
Esri Regular Contributor

Alex,

In the tools constructor you can set UseSnapping = True

  internal class SnapResultTool : MapTool
  {
    public SnapResultTool()
    {
      IsSketchTool = true;
      UseSnapping = true;
      SketchType = SketchGeometryType.Point;
      SketchOutputMode = SketchOutputMode.Map;
    }
0 Kudos
AlexZlotin1
New Contributor II

Thank you, Sean!

0 Kudos