<?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: Problem using ListFeatureClasses from a personal geodatabase in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-listfeatureclasses-from-a-personal/m-p/355001#M9342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I guess there are not many python programmers around here.&amp;nbsp; Well I kept bashing at the code.&amp;nbsp; I saw another sample code in the online help using a for loop, and did not need the fc= fcs.next () line as the while loop did.&amp;nbsp; So when I commented out the next line, and changed the while to a for loop, my program worked!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am GUESSING that the .next () attribute does not exist in ArcObjects after you run the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fcs = arcpy.ListFeatureClasses() statement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Nov 2010 16:32:49 GMT</pubDate>
    <dc:creator>karlkliparchuk</dc:creator>
    <dc:date>2010-11-22T16:32:49Z</dc:date>
    <item>
      <title>Problem using ListFeatureClasses from a personal geodatabase</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-listfeatureclasses-from-a-personal/m-p/355000#M9341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi. I am new to python and arcobjects.&amp;nbsp; I am trying to make a simple script that lists all the feature classes in a personal geodatabase, then do some customization to each feature class.&amp;nbsp; I keep hitting an error when I try to get the list of feature classes in the GDB (I assume that the layers in the GDB should be termed feature classes).&amp;nbsp; Here is the code snippet, plus the error message I get.&amp;nbsp; Any help is greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import arcpy module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, sys, os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = "C:\Data\module1data.mdb" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputGDBpath = "C:\Data" &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outputGDBname = "SS"&amp;nbsp; &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; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fcs = arcpy.ListFeatureClasses ("*", "all")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc = fcs.next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;==&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fc = fcs.next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AttributeError: 'list' object has no attribute 'next'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The gdb has 4 vector feature classes within it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Karl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Nov 2010 19:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-listfeatureclasses-from-a-personal/m-p/355000#M9341</guid>
      <dc:creator>karlkliparchuk</dc:creator>
      <dc:date>2010-11-21T19:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using ListFeatureClasses from a personal geodatabase</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-listfeatureclasses-from-a-personal/m-p/355001#M9342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I guess there are not many python programmers around here.&amp;nbsp; Well I kept bashing at the code.&amp;nbsp; I saw another sample code in the online help using a for loop, and did not need the fc= fcs.next () line as the while loop did.&amp;nbsp; So when I commented out the next line, and changed the while to a for loop, my program worked!&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am GUESSING that the .next () attribute does not exist in ArcObjects after you run the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fcs = arcpy.ListFeatureClasses() statement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 16:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problem-using-listfeatureclasses-from-a-personal/m-p/355001#M9342</guid>
      <dc:creator>karlkliparchuk</dc:creator>
      <dc:date>2010-11-22T16:32:49Z</dc:date>
    </item>
  </channel>
</rss>

