<?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 Hide individual features in ArcMap featurelayer in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482864#M13070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am developing a toolbar/extension for ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to make certain features invisible in the map, so I define featurelayer symbology based on values in one field. When setting the value outside the range, the feature is hidden. So far so good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the user can still select the same feature using ArcMaps select tool. Can this be preventet in some way? Are there other methods for controlling feature visibility?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Note: I do NOT want to delete the content of the geometry column, because it must be possible to "undelete" the feature later.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ola&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Oct 2011 13:43:40 GMT</pubDate>
    <dc:creator>OlaRennemo</dc:creator>
    <dc:date>2011-10-10T13:43:40Z</dc:date>
    <item>
      <title>Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482864#M13070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am developing a toolbar/extension for ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to make certain features invisible in the map, so I define featurelayer symbology based on values in one field. When setting the value outside the range, the feature is hidden. So far so good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the user can still select the same feature using ArcMaps select tool. Can this be preventet in some way? Are there other methods for controlling feature visibility?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Note: I do NOT want to delete the content of the geometry column, because it must be possible to "undelete" the feature later.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ola&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 13:43:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482864#M13070</guid>
      <dc:creator>OlaRennemo</dc:creator>
      <dc:date>2011-10-10T13:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482865#M13071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ola,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you saying that when you toggle the layer's visibility off, you can still see the selected features?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, then it might be that you need to do a full refresh on the ActiveView:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
'This line would refresh the selection
pDoc.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, Nothing, Nothing)
'add this line to fully refresh the view
pDoc.ActiveView.Refresh()
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482865#M13071</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T21:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482866#M13072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The layer itself is set to visible, but I am trying to hide individual features within, based on some attribute values, and even hide them the from ArcMap's selection tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ola,&lt;BR /&gt;&lt;BR /&gt;Are you saying that when you toggle the layer's visibility off, you can still see the selected features?&lt;BR /&gt;&lt;BR /&gt;If so, then it might be that you need to do a full refresh on the ActiveView:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
'This line would refresh the selection
pDoc.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, Nothing, Nothing)
'add this line to fully refresh the view
pDoc.ActiveView.Refresh()
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482866#M13072</guid>
      <dc:creator>OlaRennemo</dc:creator>
      <dc:date>2021-12-11T21:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482867#M13073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The layer itself is set to visible, but I am trying to hide individual features within, based on some attribute values, and even hide them the from ArcMap's selection tool.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So you are invoking a DefinitionQuery on a featureLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The default behavior seems to be that the selected feature should not show if included in the definition query filter.&amp;nbsp; Perhaps it is something specific with your code that is producing the behavior you are seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Post up the code you have so far.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 14:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482867#M13073</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-10-10T14:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482868#M13074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So you are invoking a DefinitionQuery on a featureLayer?&lt;BR /&gt;&lt;BR /&gt;The default behavior seems to be that the selected feature should not show if included in the definition query filter.&amp;nbsp; Perhaps it is something specific with your code that is producing the behavior you are seeing.&lt;BR /&gt;&lt;BR /&gt;Post up the code you have so far.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess a queryfilter in the featurelayer would do the trick, but cannot find out how... The examples I find are related to the ArcIMS API, and I cant find similar methods here...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you give me a hint where to start?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 05:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482868#M13074</guid>
      <dc:creator>OlaRennemo</dc:creator>
      <dc:date>2011-10-11T05:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482869#M13075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I guess a queryfilter in the featurelayer would do the trick, but cannot find out how... The examples I find are related to the ArcIMS API, and I cant find similar methods here...&lt;BR /&gt;Could you give me a hint where to start?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It would look something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pFLayer As IFeatureLayer = pMap.Layer(0)
Dim pDefQ As IFeatureLayerDefinition
pDefQ = pFLayer
pDefQ.DefinitionExpression = "OBJECTID = " &amp;amp; 11420&amp;nbsp; 'I just set this for testing an Integer value

'altered to query a string field
pDefQ.DefinitionExpression = "SomeStringField = '" &amp;amp; someStringValue &amp;amp; "'"&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482869#M13075</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T21:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482870#M13076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It would look something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pFLayer As IFeatureLayer = pMap.Layer(0)
Dim pDefQ As IFeatureLayerDefinition
pDefQ = pFLayer
pDefQ.DefinitionExpression = "OBJECTID = " &amp;amp; 11420&amp;nbsp; 'I just set this for testing an Integer value

'altered to query a string field
pDefQ.DefinitionExpression = "SomeStringField = '" &amp;amp; someStringValue &amp;amp; "'"&amp;nbsp; &lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's it, thanks a lot!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As often before, the solution is quite simple as long as you can find the right interfaces and examples. Which reminds me that the current help system, connected to the VisualStudio, usually answers everything I am NOT looking for...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482870#M13076</guid>
      <dc:creator>OlaRennemo</dc:creator>
      <dc:date>2021-12-11T21:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hide individual features in ArcMap featurelayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482871#M13077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That's it, thanks a lot!&lt;BR /&gt;As often before, the solution is quite simple as long as you can find the right interfaces and examples. Which reminds me that the current help system, connected to the VisualStudio, usually answers everything I am NOT looking for...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Excellent!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tip: I get more successful searches at the old/archived forums still.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/forums.asp?c=93"&gt;http://forums.esri.com/forums.asp?c=93&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 11:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/hide-individual-features-in-arcmap-featurelayer/m-p/482871#M13077</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-10-11T11:42:38Z</dc:date>
    </item>
  </channel>
</rss>

