Select to view content in your preferred language

Save Edit destroys the Sketch Tool

1713
0
12-10-2015 11:16 AM
MasroorHussain
Deactivated User

I have edit tool(s) in ArcObjects (ArcGIS10.3). The first tool is "Create a new Polygon' and following is the code:

Note: mpEditor is class member and Project is in Edit Mode

private void StartCreatePolygon()

{

IEditTaskSearch pEditTaskSearch;

IEditTask pEditTask;

  pEditTaskSearch = (IEditTaskSearch)mpEditor;

  pEditTask =     pEditTaskSearch.get_TaskByUniqueName("GarciaUI_CreateNewFeatureTask");

if (pEditTask != null)

{

   mpEditor.CurrentTask = pEditTask;

   SelectSketchTool();

}

}

private void SelectSketchTool()

{

   //'Selects the default sketch tool

   UID pID = new UID();

   ICommandBars pCommandBars = mpApp.Document.CommandBars;

   ICommandItem pCommandItem;

   pID.Value = "esriEditor.SketchTool";

   pCommandItem = pCommandBars.Find(pID);

   if (pCommandItem != null)

   {

     pCommandItem.Execute();

   }

}

PROBLEM: When I finish Crating a new polygon and press "Save Edits" on the ArcGIS Edit tool bar, the 'esriEditor.SketchTool' disappears and normal 'Arrow' icon is activated.

Please help me that after save I keep the Sketch Tool ON.

0 Kudos
0 Replies