ArcObjects SDK for .NET and ArcGIS 10 Desktop
Quick snippet to set the stage:
IEditor3 editor.StartOperation();
IFeature newFeature;
// fill out newFeature.Shape, etc.
newFeature.Store();
editor.StopOperation("Adding new feature");
At this point I'd like to automatically "show" the attributes for this new feature in the Attribute display/table, which could be visible alongside the Create Features template list.
Equivalent process through ArcMap itself:
- Start the Editor via the Editor Toolbar.
- Click a feature template from the Create Features list.
- Click the Attributes button to open the Attributes display.
- Mouse-down in ArcMap. See new/default attributes for the new feature be displayed in the Attributes table area.
Is the possible with ArcObjects for .NET?
Best Answer
You can execute the command to show the window yourself as in the code below:
Edit: then, to view the feature in the Attributes window, you would add it to its layer selection set (via the layer's IFeatureSelection interface). You will also need to notify ArcMap about the selection change - call IFeatureSelection.SelectionChanged, followed by ISelectionEvents.SelectionChanged (you would obtain ISelectionEvents by casting from the Map class).