Can you cycle through selected features in Attribute Editing window?

255
1
12-14-2011 03:14 AM
Highlighted
New Contributor
Howdy All,
    My hopefully pretty simple question is: Can you programmatically cycle through the selected features in the Attribute Editor windows?  I'm referring to the tree in the top panel.  I am trying to create an Add-in the has a couple of buttons on it that will cycle through the selected features  and display some things, along with allowing the user to use the attribute editor to change some of the attributes...  Hopefully it can be done without having to clear or change the selected set of features.  I know that you can "click" them individually, but I am trying to use the buttons on my form to move through the set...  What I'm trying to get at is when you use the button, the highlighted item will move to the next one and the attributes listed below will change to the new feature.

I do have an array of objectIDs within the form's code, if that helps any....

Attached is a picture of where I'm talking about...



Thanks in advance,
Kevin Orcutt
Reply
0 Kudos
1 Reply
Highlighted
Regular Contributor
Kevin,

First off the attribute window is not customizable. But you can cycle through selected items using IEditor. The selected items that appear in the attribute window should be the same items that are selected on the map.


              if (app == null)
                  return null;
              ESRI.ArcGIS.esriSystem.UID uid = new ESRI.ArcGIS.esriSystem.UIDClass();
              uid.Value = "{F8842F20-BB23-11D0-802B-0000F8037368}";
              ESRI.ArcGIS.esriSystem.IExtension extension = app.FindExtensionByCLSID(uid);
              IEditor3 editor3 = extension as IEditor3;


              IEnumFeature enumFeat = editor3.EditSelection;
              IFeature feat = null;
              while ((feat = enumFeat.Next()) != null)
              {
                 //do something
              }
Reply
0 Kudos