<?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: [ArcGIS 9.3.1] FeatureClass problem in Python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328036#M11535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tell you that I became crazy. Yes I made a mistake in the the post. the real line is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fcs = desc.FeatureClass and the error msg is : &amp;lt;type 'exceptions.RuntimeError'&amp;gt;: DescribeData: Method FeatureClass does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I believe you made an error in the line that reads:&lt;BR /&gt;&lt;BR /&gt; fcs = mygp.FeatureClass # dont work ! same case for FIDSet property for a layer&lt;BR /&gt;&lt;BR /&gt;it seems that it should read:&lt;BR /&gt;&lt;BR /&gt; fcs = desc.FeatureClass # change from gp object to describe object&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Oct 2010 11:54:26 GMT</pubDate>
    <dc:creator>GELIG</dc:creator>
    <dc:date>2010-10-30T11:54:26Z</dc:date>
    <item>
      <title>[ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328034#M11533</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;I verified that I work under ArcGIS 9.3.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My code dont work,I dont understand why ! I become crazy. Someone could help me ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Very simple code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
 mygp = load(version=9.3) # load geoprocessor
 mygp.OverWriteOutput = True
 desc = mygp.describe("c:\temp\VillageSurvey.mdb\Land")
 mygp.AddMessage(str(desc.Extent)) #that is ok
 fcs = mygp.FeatureClass # dont work ! same case for FIDSet property for a layer
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Msg is &amp;lt;type 'exceptions.AttributeError'&amp;gt;: Object: Tool or environment &amp;lt;FeatureClass&amp;gt; not found&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for any help !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Oct 2010 06:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328034#M11533</guid>
      <dc:creator>GELIG</dc:creator>
      <dc:date>2010-10-30T06:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: [ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328035#M11534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;hi all,&lt;BR /&gt;&lt;BR /&gt;I verified that I work under ArcGIS 9.3.1.&lt;BR /&gt;My code dont work,I dont understand why ! I become crazy. Someone could help me ?&lt;BR /&gt;Very simple code:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 mygp = load(version=9.3) # load geoprocessor
 mygp.OverWriteOutput = True
 desc = mygp.describe("c:\temp\VillageSurvey.mdb\Land")
 mygp.AddMessage(str(desc.Extent)) #that is ok
 fcs = mygp.FeatureClass # dont work ! same case for FIDSet property for a layer
&lt;/PRE&gt;&lt;BR /&gt;Msg is &amp;lt;type 'exceptions.AttributeError'&amp;gt;: Object: Tool or environment &amp;lt;FeatureClass&amp;gt; not found&lt;BR /&gt;&lt;BR /&gt;thanks for any help !&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe you made an error in the line that reads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; fcs = mygp.FeatureClass # dont work ! same case for FIDSet property for a layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it seems that it should read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; fcs = desc.FeatureClass # change from gp object to describe object&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:32:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328035#M11534</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: [ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328036#M11535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tell you that I became crazy. Yes I made a mistake in the the post. the real line is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fcs = desc.FeatureClass and the error msg is : &amp;lt;type 'exceptions.RuntimeError'&amp;gt;: DescribeData: Method FeatureClass does not exist&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I believe you made an error in the line that reads:&lt;BR /&gt;&lt;BR /&gt; fcs = mygp.FeatureClass # dont work ! same case for FIDSet property for a layer&lt;BR /&gt;&lt;BR /&gt;it seems that it should read:&lt;BR /&gt;&lt;BR /&gt; fcs = desc.FeatureClass # change from gp object to describe object&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Oct 2010 11:54:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328036#M11535</guid>
      <dc:creator>GELIG</dc:creator>
      <dc:date>2010-10-30T11:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: [ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328037#M11536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You cannot read FeatureClass as a property of the describe, it is just a heading for a property group in the gp programming model, but you can read any of the properties for the FeatureClass that are listed under the FeatureClass property group in the &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/pdf/Geoprocessor_93.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;gp programming model&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; For example you can read FeatureType.&amp;nbsp; I tested the code below and it works (with one of my featureclasses in the place of yours).&amp;nbsp; I do not know why the FIDSet property did not work.&amp;nbsp; Perhaps it did not work because the object you described was just a featureclass and not a layer.&amp;nbsp; I think you would have to use the mygp.CreateLayer_Management tool (or whatever it is that creates a layer from a feature class) and describe the layer to get that property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcgisscripting
#Process: Create the gp object
mygp = arcgisscripting.create(9.3)
mygp.OverWriteOutput = True
desc = mygp.describe("c:\\temp\\VillageSurvey.mdb\\Land") # added slashes to read as file name
mygp.AddMessage(str(desc.Extent)) #that is ok
fcs = desc.featuretype # works !&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328037#M11536</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T15:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: [ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328038#M11537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layer is a properties of FeatureClass. I dont understand why FIDSet dont work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Be sure that Land is a a layer (parcel land from geodatabase)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1- Try desc.Layer.FIDSet --&amp;gt; dont work&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2- Try mygp.MakeFeatureLayer_management(desc.CatalogPath,"out").FIDSet ---&amp;gt; dont work also&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is how instantiate an object FeatureClass to access Layer properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You cannot read FeatureClass as a property of the describe, it is just a heading for a property group in the gp programming model, but you can read any of the properties for the FeatureClass that are listed under the FeatureClass property group in the &lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/pdf/Geoprocessor_93.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;gp programming model&lt;/A&gt;.&amp;nbsp; For example you can read FeatureType.&amp;nbsp; I tested the code below and it works (with one of my featureclasses in the place of yours).&amp;nbsp; I do not know why the FIDSet property did not work.&amp;nbsp; Perhaps it did not work because the object you described was just a featureclass and not a layer.&amp;nbsp; I think you would have to use the mygp.CreateLayer_Management tool (or whatever it is that creates a layer from a feature class) and describe the layer to get that property.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcgisscripting
#Process: Create the gp object
mygp = arcgisscripting.create(9.3)
mygp.OverWriteOutput = True
desc = mygp.describe("c:\\temp\\VillageSurvey.mdb\\Land") # added slashes to read as file name
mygp.AddMessage(str(desc.Extent)) #that is ok
fcs = desc.featuretype # works !&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328038#M11537</guid>
      <dc:creator>GELIG</dc:creator>
      <dc:date>2021-12-11T15:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: [ArcGIS 9.3.1] FeatureClass problem in Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328039#M11538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you for your time.&lt;BR /&gt;Layer is a properties of FeatureClass. I dont understand why FIDSet dont work.&lt;BR /&gt;Be sure that Land is a a layer (parcel land from geodatabase)&lt;BR /&gt;1- Try desc.Layer.FIDSet --&amp;gt; dont work&lt;BR /&gt;2- Try mygp.MakeFeatureLayer_management(desc.CatalogPath,"out").FIDSet ---&amp;gt; dont work also&lt;BR /&gt;&lt;BR /&gt;The question is how instantiate an object FeatureClass to access Layer properties.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are incorrect about some of your ideas.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. A Layer is a separate object that depends on a FeatureClass, but a FeatureClass exists independently from a Layer.&amp;nbsp; So while a FeatureClass can be accessed as a property of a described Layer, a Layer cannot be accessed directly from a described FeatureClass, it has to be created from the FeatureClass first before you can access its properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; You are bypassing the describe of the Layer object that is created by the MakeFeatureLayer_management tool.&amp;nbsp; Each new object needs its own describe to access its describe properties.&amp;nbsp; I believe the code needs to read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lyr = mygp.MakeFeatureLayer_management(desc.CatalogPath,"out")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;descLyr = describe(Lyr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myFIDset = descLyr.FIDSet&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myFC = descLyr.FeatureClass # works because a FeatureClass is a property of a described Layer, but not the other way around&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code above preserves both the Layer object itself for use in other gp tool processes and creates a describe object to access the describe properties of the layer for python processing and programming logic.&amp;nbsp; It also provides a FeatureClass object for any tools that require that as an input.&amp;nbsp; A FeatureClass is not a property of FeatureClass.&amp;nbsp; It is the object type itself.&amp;nbsp; This is why you could not access it as a property of the first describe from the FeatureClass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The gp Programming diagram shows that a FeatureClass inherits properties from a Table and a DataSet.&amp;nbsp; A Dataset includes an Extent property, which is why that property worked.&amp;nbsp; But a FeatureClass does not inherit properties from a Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A Layer shows that it inherits properties from a FeatureClass.&amp;nbsp; It therefore should also inherit properties from Table and Dataset.&amp;nbsp; So both Lyr.FeatureType and Lyr.Extent should work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Oct 2010 16:25:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcgis-9-3-1-featureclass-problem-in-python/m-p/328039#M11538</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2010-10-30T16:25:21Z</dc:date>
    </item>
  </channel>
</rss>

