How to use IFeatureSelection.SetSelectionSymbol

3355
2
Jump to solution
11-13-2015 04:14 PM
forestknutsen1
MVP Regular Contributor

I am new to C# ArcObjects applications. I have a what I am sure is a very simple question.

I have a bit of code that selects a line feature. If one opens the attribute table it does in fact show the line as selected; however, it does not show up as selected in the data view.

From VS debugger.

              rowIdentifyObj = (IRowIdentifyObject)featureIdentifyObj;
              feature = (IFeature)rowIdentifyObj.Row;
              iSelection = (IFeatureSelection)pipeCenterlineLayer;
              iSelection.Add(feature);

Do I need to set the SetSelectionSymbol to true?

Thanks for any help.

0 Kudos
1 Solution

Accepted Solutions
FreddieGibson
Occasional Contributor III

Did refresh the display? I would assume that you'd need to make a call to IActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);

View solution in original post

2 Replies
FreddieGibson
Occasional Contributor III

Did refresh the display? I would assume that you'd need to make a call to IActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, null, null);

forestknutsen1
MVP Regular Contributor

Sorry, it took me a few days to get back to the project. The partial refresh did the trick! Thanks for the help.

0 Kudos