<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IFeatureSelection :: Clear does not clear graphics selection in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361229#M9515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having trouble with the following : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a selection on features and store it into an IFeatureSelection. Then I clear the selection with the method Clear(). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The featureselection is indeed empty, but on the map, I still see that the features are selected, but they are not really in reality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// My selection of features IFeatureSelection plantSelection = infosXML.LayerPlant as IFeatureSelection; // Load of code ... // Clear the selection plantSelection.Clear();&amp;nbsp; // Refresh the screen ArcMap.Document.ActiveView.Refresh();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be REALLY appreciated! Ty all&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jun 2012 20:06:36 GMT</pubDate>
    <dc:creator>SachaTousignant</dc:creator>
    <dc:date>2012-06-04T20:06:36Z</dc:date>
    <item>
      <title>IFeatureSelection :: Clear does not clear graphics selection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361229#M9515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having trouble with the following : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a selection on features and store it into an IFeatureSelection. Then I clear the selection with the method Clear(). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The featureselection is indeed empty, but on the map, I still see that the features are selected, but they are not really in reality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// My selection of features IFeatureSelection plantSelection = infosXML.LayerPlant as IFeatureSelection; // Load of code ... // Clear the selection plantSelection.Clear();&amp;nbsp; // Refresh the screen ArcMap.Document.ActiveView.Refresh();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be REALLY appreciated! Ty all&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 20:06:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361229#M9515</guid>
      <dc:creator>SachaTousignant</dc:creator>
      <dc:date>2012-06-04T20:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureSelection :: Clear does not clear graphics selection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361230#M9516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're calling Refresh on the document's active view.&amp;nbsp; If the document is in Layout view then this will refresh the layout and not the map inside of the map frame.&amp;nbsp; If the document is in Data view then this will refresh the map in the table of contents that is currently active.&amp;nbsp; If you are calling this code while in Data view and the map that contains the layer is active then this should work.&amp;nbsp; Otherwise, you will need to get the appropriate active view reference before calling Refresh.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 20:43:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361230#M9516</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-06-04T20:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureSelection :: Clear does not clear graphics selection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361231#M9517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This might be once of the cases where you have to refresh twice.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 20:44:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361231#M9517</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-06-04T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureSelection :: Clear does not clear graphics selection</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361232#M9518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You're calling Refresh on the document's active view.&amp;nbsp; If the document is in Layout view then this will refresh the layout and not the map inside of the map frame.&amp;nbsp; If the document is in Data view then this will refresh the map in the table of contents that is currently active.&amp;nbsp; If you are calling this code while in Data view and the map that contains the layer is active then this should work.&amp;nbsp; Otherwise, you will need to get the appropriate active view reference before calling Refresh.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ty Neil for your reply, I found out how to fix my problem, here's the code in case someone else needs it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IActiveView activeView = ArcMap.Document.FocusMap as IActiveView; activeView.Refresh();&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2012 12:38:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeatureselection-clear-does-not-clear-graphics/m-p/361232#M9518</guid>
      <dc:creator>SachaTousignant</dc:creator>
      <dc:date>2012-06-05T12:38:04Z</dc:date>
    </item>
  </channel>
</rss>

