Replicating ArcMap's Point Sketch Geometry Editing in ArcObjects

Discussion created by keithgemeinhart on Aug 10, 2011
I'm looking for a way to place, select, move, delete features inside a custom C# ArcObjects application (using AxMapControl). I found the exact behavior in ArcMap, but I want to save the user some steps and avoid all of the dialogs, etc. It appears to be creating a point sketch geometry.

In ArcMap, I can do the following steps:

  1. Open a new map doc

  2.     Choose start editing from the Editor toolbar

  3.     Then I get a dialog asking me to choose the layer to edit

  4.     After selecting a layer, a panel appears that is titled "Create Features". Under it, there is another panel named "Construction Tools"

  5.     When I click on a feature in the upper panel, I get a "Point" option in the lower panel

  6.     Now when I move the mouse over the map, the cursor has the same icon as the feature I selected.

  7.     Clicking will place a feature, then I can drag or delete.

So ... how can I replicate this behavior in a custom app using ArcObjects. I've already been able to replicate the behavior of other tools by doing something like this:

ICommandPoolEdit _commandPool = new CommandPoolClass();
ICommand solveRouteToolCmd = new ControlsNetworkAnalystSolveCommand();
_commandPool.AddCommand(solveRouteToolCmd, null);

ICommand command = commandPool.get_Command((int)solveRouteToolCmd );

//pass the MapControl to the oncreate method
//run the tool

However, I can't seem to find a tool class object that corresponds to this behavior. In this example ControlsNetworkAnalystSolveCommand class is the hook to the same behavior that happens when you click the solve route button in ArcMap. I'm looking for that same hook for the scenario described above.

Note that I found the tools by looking at the customize menu dialog. They are in the commands tab, in the editor category. The specific command is called Point and the description says, "Creates a point sketch geometry".