<?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 Creating a list of features from a RowCursor in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360223#M10849</link>
    <description>&lt;P&gt;I am using a RowCursor to build a List of Features. In the While loop, my debug statement returns OBJECTIDs 1 and 2, but in the For loop after the RowCursor, the OBJECTIDs are 2 and 2. Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt; Dim mm as MapMember
 Dim pPointFeatures As List(Of Feature) = New List(Of Feature)
 Dim qf as ArcGIS.Core.Data.QueryFilter
 qf.WhereClause = "OBJECTID IN (1, 2)"
 Using c As RowCursor = CType(mm, BasicFeatureLayer).Search(qf)
	 While c.MoveNext
		 Debug.Print(CType(c.Current, Feature).Item("OBJECTID").ToString())
		 ' Prints 1 and 2
		 pPointFeatures.Add(CType(c.Current, Feature))
	 End While
 End Using
 For Each p In pPointFeatures
	 Debug.Print(p("OBJECTID").ToString())
	 ' Prints 2 and 2
 Next&lt;/LI-CODE&gt;&lt;P&gt;I&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 12:59:19 GMT</pubDate>
    <dc:creator>EricPfirman</dc:creator>
    <dc:date>2023-12-13T12:59:19Z</dc:date>
    <item>
      <title>Creating a list of features from a RowCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360223#M10849</link>
      <description>&lt;P&gt;I am using a RowCursor to build a List of Features. In the While loop, my debug statement returns OBJECTIDs 1 and 2, but in the For loop after the RowCursor, the OBJECTIDs are 2 and 2. Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt; Dim mm as MapMember
 Dim pPointFeatures As List(Of Feature) = New List(Of Feature)
 Dim qf as ArcGIS.Core.Data.QueryFilter
 qf.WhereClause = "OBJECTID IN (1, 2)"
 Using c As RowCursor = CType(mm, BasicFeatureLayer).Search(qf)
	 While c.MoveNext
		 Debug.Print(CType(c.Current, Feature).Item("OBJECTID").ToString())
		 ' Prints 1 and 2
		 pPointFeatures.Add(CType(c.Current, Feature))
	 End While
 End Using
 For Each p In pPointFeatures
	 Debug.Print(p("OBJECTID").ToString())
	 ' Prints 2 and 2
 Next&lt;/LI-CODE&gt;&lt;P&gt;I&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 12:59:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360223#M10849</guid>
      <dc:creator>EricPfirman</dc:creator>
      <dc:date>2023-12-13T12:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a list of features from a RowCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360237#M10850</link>
      <description>&lt;P&gt;Your code is using a recycling cursor (the default method). You have set the useRecyclingCursor parameter to false when using the Search method.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Using c As RowCursor = CType(mm, BasicFeatureLayer).Search(qf, false)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Read a little more about recycling cursors &lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/what-does-userecyclingcursor-mean/m-p/1302262" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 13:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360237#M10850</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-12-13T13:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a list of features from a RowCursor</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360244#M10851</link>
      <description>&lt;P&gt;Wow! Thanks! I never knew. Small note, I had to add GetTable() so I could use the Table Search and then it worked.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Using c As RowCursor = CType(mm, BasicFeatureLayer).GetTable().Search(qf, False)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 14:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/creating-a-list-of-features-from-a-rowcursor/m-p/1360244#M10851</guid>
      <dc:creator>EricPfirman</dc:creator>
      <dc:date>2023-12-13T14:04:45Z</dc:date>
    </item>
  </channel>
</rss>

