<?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: Delete Feature Class from Geodatabase using arcpy not working in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71261#M5863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And that worked too.Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2020 02:24:45 GMT</pubDate>
    <dc:creator>PaulaMorrissey</dc:creator>
    <dc:date>2020-09-04T02:24:45Z</dc:date>
    <item>
      <title>Delete Feature Class from Geodatabase using arcpy not working</title>
      <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71257#M5859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have looked at other the scripts to delete feature classes in Geodatabases but all I can do is remove the feature classes from the Contents window but they are still in the Geodatabase in Catalog. I'm not sure that I am using the correct function Delete_management&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"C:\Data\Temp.gdb"&lt;/P&gt;&lt;P&gt;fc_Delete = ["fcOut1a","fc_Out2a","fc_Out3a"]&lt;/P&gt;&lt;P&gt;for fc in fc_Delete:&lt;BR /&gt; if arcpy.Exists(fc):&lt;BR /&gt; arcpy.Delete_management(fc,"")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 06:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71257#M5859</guid>
      <dc:creator>PaulaMorrissey</dc:creator>
      <dc:date>2020-09-03T06:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Feature Class from Geodatabase using arcpy not working</title>
      <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71258#M5860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is an ArcPy question, so I am sharing with &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌.&amp;nbsp; Questions here are more for ArcGIS API for Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally, I never rely on the workspace to assume path names because doing so inevitably causes issues like this one.&amp;nbsp; If you are running this code in the interactive Python window, then what you are removing isn't the feature class but the layer that has the same name as the feature class.&amp;nbsp; Even though you set the workspace, the Delete tool gives preference to layers before data sets.&amp;nbsp; If you want to delete the feature class, pass the full path of the FC to the tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2020 13:01:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71258#M5860</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-09-03T13:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Feature Class from Geodatabase using arcpy not working</title>
      <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71259#M5861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could reassign your workspace to a new variable and do something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;import arcpy, os&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;arcpy.env.workspace = r"C:\Data\Temp.gdb"&lt;BR /&gt;cws = arcpy.env.workspace&lt;/P&gt;&lt;P style="border: 0px;"&gt;fc_Delete = ["fcOut1a","fc_Out2a","fc_Out3a"]&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;for fc in fc_Delete:&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp; fc_path = os.path.join(cws, fc)&lt;BR /&gt;&amp;nbsp; if arcpy.Exists(fc_path):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; arcpy.Delete_management(fc_path)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2020 01:41:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71259#M5861</guid>
      <dc:creator>LanceKirby2</dc:creator>
      <dc:date>2020-09-04T01:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Feature Class from Geodatabase using arcpy not working</title>
      <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71260#M5862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added the full path and that worked, Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2020 02:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71260#M5862</guid>
      <dc:creator>PaulaMorrissey</dc:creator>
      <dc:date>2020-09-04T02:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Feature Class from Geodatabase using arcpy not working</title>
      <link>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71261#M5863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And that worked too.Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2020 02:24:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/delete-feature-class-from-geodatabase-using-arcpy/m-p/71261#M5863</guid>
      <dc:creator>PaulaMorrissey</dc:creator>
      <dc:date>2020-09-04T02:24:45Z</dc:date>
    </item>
  </channel>
</rss>

