<?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 Re: How to display only selected features in a featureclass in C# in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51075#M1333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use IFeaturelayerDefintion and set the .DefinitionExpression with your SQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: oops sorry Ken, you were first!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2012 14:09:55 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2012-07-06T14:09:55Z</dc:date>
    <item>
      <title>How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51071#M1329</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;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i have situation like, in one of my featureclass we have 100 features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using queryfilter we have selected only 20 features from total 100 featrues&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently i am seeing all 100 features with 20 selection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Now my problem is, i have to display only 20 features in map. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 01:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51071#M1329</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2012-07-06T01:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51072#M1330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can switch off symbol of layer from Symbol Selector -&amp;gt; Symbol Property Editor window. In this case all 100 features will not be shown. But the result of query filter will be shown.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 03:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51072#M1330</guid>
      <dc:creator>AysberqTundra</dc:creator>
      <dc:date>2012-07-06T03:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51073#M1331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; But I am working in ArcObjects using C#. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Can you please suggest in this regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 13:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51073#M1331</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2012-07-06T13:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51074#M1332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried using an &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/#/IFeatureLayerDefinition_Interface/0012000004v2000000/"&gt;IFeatureLayerDefinition&lt;/A&gt;&lt;SPAN&gt;? This will display only the selected features as determined by a definition expression (which should be the same syntax as the whereclause in your queryfilter)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 14:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51074#M1332</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-07-06T14:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51075#M1333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use IFeaturelayerDefintion and set the .DefinitionExpression with your SQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: oops sorry Ken, you were first!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 14:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51075#M1333</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2012-07-06T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51076#M1334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Thanks for your valuable suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I have tried to use 'IFeatureLayerDefinition' in the below way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFDef = (IFeatureLayerDefinition2)pFLayer2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFDef.DefinitionExpression = "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFDef.DefinitionExpression = "strColumn_Name='" + myObject.ToString() + "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pActiveView = (IActiveView)pMap;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pActiveView.Refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when i am running the code, in ArcMap I am getting ArcMap drawing error as "One or more layers failed to draw:"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you please suggest further.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 00:54:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51076#M1334</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2012-07-11T00:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51077#M1335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There could be a couple of things at issue. Is 'strColumn_Name' the name of the field or a variable that hold the name of the field? If it's a variable, then you should use&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pFDef.DefinitionExpression = strColumn_Name + "='" + myObject.ToString() + "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the field numeric instead of string? Then you would remove the single quotes from the string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest comparing the DefinitionExpression value (use the debugging mode to see what it is exactly) with the expression that works properly in ArcMap&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 12:19:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51077#M1335</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-07-11T12:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51078#M1336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Thanks for your reply Ken. But I have crossed-check once again through debugging. I am getting the proper value into the DefinitionExpressioin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Can anyone please share some sample code related to my problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2012 10:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51078#M1336</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2012-07-14T10:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display only selected features in a featureclass in C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51079#M1337</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;&amp;nbsp;&amp;nbsp; Thanks for your suggestions. Now it is working fine by using IFeatureLayerDefinition2.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 03:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-display-only-selected-features-in-a/m-p/51079#M1337</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2012-07-19T03:46:40Z</dc:date>
    </item>
  </channel>
</rss>

