<?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 Question about selecting objects from layers in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/question-about-selecting-objects-from-layers/m-p/582028#M15727</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;I use ArcGis Desktop 10.1 and I try to get all selected objects from a few layers. All selected objects are about 1mln so it is a huge amount. I try to get this working by the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;featureSelection.SelectionSet.Search(null, true, out cursor);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;Logger.Log.Info(string.Format("Number of selected objects {0}: {1}", featureClass.AliasName, featureSelection.SelectionSet.Count));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;while ((row = cursor.NextRow()) != null)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;But even though I get featureSelection.SelectionSet.Count &amp;gt; 0, cursor.NextRow getting a null value. When I try to get only one problem layer everything is all right. I'm going to implement cursor division by IQueryFilter but is it a correct solution? Maybe is a other way to solve it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jan 2015 20:49:14 GMT</pubDate>
    <dc:creator>MarcinKorkuś</dc:creator>
    <dc:date>2015-01-05T20:49:14Z</dc:date>
    <item>
      <title>Question about selecting objects from layers</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/question-about-selecting-objects-from-layers/m-p/582028#M15727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;I use ArcGis Desktop 10.1 and I try to get all selected objects from a few layers. All selected objects are about 1mln so it is a huge amount. I try to get this working by the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;featureSelection.SelectionSet.Search(null, true, out cursor);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;Logger.Log.Info(string.Format("Number of selected objects {0}: {1}", featureClass.AliasName, featureSelection.SelectionSet.Count));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;while ((row = cursor.NextRow()) != null)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 12pt;"&gt;But even though I get featureSelection.SelectionSet.Count &amp;gt; 0, cursor.NextRow getting a null value. When I try to get only one problem layer everything is all right. I'm going to implement cursor division by IQueryFilter but is it a correct solution? Maybe is a other way to solve it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 20:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/question-about-selecting-objects-from-layers/m-p/582028#M15727</guid>
      <dc:creator>MarcinKorkuś</dc:creator>
      <dc:date>2015-01-05T20:49:14Z</dc:date>
    </item>
  </channel>
</rss>

