<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MapTool Sketch Type Circle Bug? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/maptool-sketch-type-circle-bug/m-p/1594598#M12733</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an issue which seems to be a bug, but correct me if I'm wrong.&lt;/P&gt;&lt;P&gt;Whenever I use 'SketchGeometryType.Circle' as the 'SketchType' on any MapTool, I get this sort of bug(?) wherein the tool runs properly until I try to choose 'Circle' or 'Three Point Circle' in the editing toolbar. If I click on 'Circle', the custom tool is deactivated and the standard 'Circle' tool is activated. If I click on 'Three Point Circle', I get the default 'Line' or 'Polygon' tool. This only happens when SketchType is set to 'SketchGeometryType.Circle' for some reason.&lt;/P&gt;&lt;P&gt;Anyone got any thoughts on this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neil_perol_0-1741744272177.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127724iEA21280F4B862DC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="neil_perol_0-1741744272177.png" alt="neil_perol_0-1741744272177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Pro: Version 3.4&lt;/P&gt;</description>
    <pubDate>Wed, 12 Mar 2025 01:52:43 GMT</pubDate>
    <dc:creator>neil_perol</dc:creator>
    <dc:date>2025-03-12T01:52:43Z</dc:date>
    <item>
      <title>MapTool Sketch Type Circle Bug?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/maptool-sketch-type-circle-bug/m-p/1594598#M12733</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an issue which seems to be a bug, but correct me if I'm wrong.&lt;/P&gt;&lt;P&gt;Whenever I use 'SketchGeometryType.Circle' as the 'SketchType' on any MapTool, I get this sort of bug(?) wherein the tool runs properly until I try to choose 'Circle' or 'Three Point Circle' in the editing toolbar. If I click on 'Circle', the custom tool is deactivated and the standard 'Circle' tool is activated. If I click on 'Three Point Circle', I get the default 'Line' or 'Polygon' tool. This only happens when SketchType is set to 'SketchGeometryType.Circle' for some reason.&lt;/P&gt;&lt;P&gt;Anyone got any thoughts on this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neil_perol_0-1741744272177.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127724iEA21280F4B862DC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="neil_perol_0-1741744272177.png" alt="neil_perol_0-1741744272177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ArcGIS Pro: Version 3.4&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 01:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/maptool-sketch-type-circle-bug/m-p/1594598#M12733</guid>
      <dc:creator>neil_perol</dc:creator>
      <dc:date>2025-03-12T01:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: MapTool Sketch Type Circle Bug?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/maptool-sketch-type-circle-bug/m-p/1597882#M12778</link>
      <description>&lt;P&gt;Hi Neil,&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a MapTool when you are sketching, there are two properties that typically affect the sketch.&amp;nbsp; SketchType and SketchMode.&amp;nbsp; The combination of these two properties control the sketch feedback that is displayed on the map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the case of sketching a line (SketchType = SketchGeometryType.Line), there is a wide range of SketchModes that can be used to construct the line.&amp;nbsp; The default SketchMode is SketchMode.Line but this can be changed via code or the UI.&amp;nbsp; These sketchModes are what you see on the editing toolbar when the sketch/construction tool is activated.&amp;nbsp; When a button on the editing toolbar is clicked (such as RightAngle, Arc, Bezier etc), then the SketchMode of the tool is being altered - allowing different types of line segments to be constructed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The editing toolbar works a little differently with the SketchGeometryType.Circle, since the SketchMode property does not apply.&amp;nbsp; &amp;nbsp;In this case, the toolbar contains 2 different tools for constructing circles.&amp;nbsp; The Circle Tool&amp;nbsp; &amp;nbsp;(damlID&amp;nbsp;esri_editing_SketchCircleLineTool) and the Three Point Circle Tool (damlID&amp;nbsp;esri_editing_SketchLineThreePointCircleTool).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;This toolbar is defined in the Editing.daml file as follows&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;miniToolbar id="esri_editing_LineCircleToolbar"&amp;gt;
          &amp;lt;row&amp;gt;
            &amp;lt;button refID="esri_editing_AddDeviceLocationCommand"/&amp;gt;
            &amp;lt;button refID="esri_editing_SketchCircleLine" separator="true"/&amp;gt;
            &amp;lt;button refID="esri_editing_SketchLineThreePointCircle"/&amp;gt;
            &amp;lt;button refID="esri_editing_FinishSketch" separator="true" /&amp;gt;
            &amp;lt;button refID="esri_editing_ClearSketch" /&amp;gt;
          &amp;lt;/row&amp;gt;
        &amp;lt;/miniToolbar&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When any of the items on the editing toolbar is clicked, then that tool will be activated (and your tool deactivated).&amp;nbsp;&lt;/P&gt;&lt;P&gt;To avoid this scenario you can have your tool show a different editing toolbar.&amp;nbsp; Just define a miniToolbar within your add-in in the daml file.&amp;nbsp; &amp;nbsp;And then within your sketch tool set the ContextToolbarID property to the damlID of the miniToolbar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example&lt;/P&gt;&lt;P&gt;(daml file)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;controls&amp;gt;
 &amp;lt;!-- your construction tool --&amp;gt;
  &amp;lt;tool id="sketchTypeCircle_ConstructionTool_circle" categoryRefID="esri_editing_construction_polyline" caption="ConstructionTool _circle" className="ConstructionTool_circle" loadOnClick="true" smallImage="GenericButtonRed16" largeImage="GenericButtonRed32"&amp;gt;
    &amp;lt;!--note: use esri_editing_construction_polyline,  esri_editing_construction_polygon for categoryRefID as needed--&amp;gt;
    &amp;lt;tooltip heading="My circle tool"&amp;gt;&amp;lt;disabledText /&amp;gt;&amp;lt;/tooltip&amp;gt;
    &amp;lt;content guid="9d63cec0-062c-4ac0-9a0d-69a02e1e2b4a" /&amp;gt;
  &amp;lt;/tool&amp;gt;
&amp;lt;/controls&amp;gt;
&amp;lt;miniToolbars&amp;gt;
    &amp;lt;!-- your toolbar 
       references your custom tool, then the standard 3 point circle tool
        followed by finish sketch, clear sketch
    --&amp;gt;
    &amp;lt;miniToolbar id="MyCircleToolbar"&amp;gt;
    &amp;lt;row&amp;gt;
      &amp;lt;button refID="sketchTypeCircle_ConstructionTool_circle" /&amp;gt;
      &amp;lt;button refID="esri_editing_SketchLineThreePointCircle"/&amp;gt;
      &amp;lt;button refID="esri_editing_FinishSketch" separator="true" /&amp;gt;
      &amp;lt;button refID="esri_editing_ClearSketch" /&amp;gt;
    &amp;lt;/row&amp;gt;
  &amp;lt;/miniToolbar&amp;gt;
&amp;lt;/miniToolbars&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;(cs file)&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;internal class ConstructionTool_circle : MapTool
{
  public ConstructionTool_circle()
  {
    IsSketchTool = true;
    UseSnapping = true;
    SketchType = SketchGeometryType.Circle;
    //Gets or sets whether the sketch is for creating a feature and should use the CurrentTemplate.
    UsesCurrentTemplate = true;
    //Gets or sets whether the tool supports firing sketch events when the map sketch changes. 
    //Default value is false.
    FireSketchEvents = true;

    // set the toolbar 
    ContextToolbarID = "MyCircleToolbar";
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 03:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/maptool-sketch-type-circle-bug/m-p/1597882#M12778</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2025-03-21T03:17:21Z</dc:date>
    </item>
  </channel>
</rss>

