michaelforst

remove feature from current selection

Discussion created by michaelforst on Apr 28, 2011
Latest reply on Apr 28, 2011 by CWang-esristaff
Hi,
is it possible to remove/unselect features from current selection programmatically? Why?

At the end, I have only one / the last feature in my selection!

Here is my Code example C#:

IMap pMap = axMapControl1.Map;
int SelObjects = pMap.SelectionCount;
IEnumFeature pEnumfeat;
IFeature pFeature;
pEnumfeat = pMap.FeatureSelection as IEnumFeature;
pFeature = pEnumfeat.Next();

for (int i = 1; i < SelObjects; i++)
            {
                //?????? remove feature from current selection
                pFeature = pEnumfeat.Next();
            }

Thank you!

Outcomes