<?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: Python: DeleteField Management_for loop in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265442#M20423</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Feb 2015 17:00:11 GMT</pubDate>
    <dc:creator>LarryAdgate</dc:creator>
    <dc:date>2015-02-02T17:00:11Z</dc:date>
    <item>
      <title>Python: DeleteField Management_for loop</title>
      <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265440#M20421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If someone could help me with this, I would forever be greatful. My preference is not to repeat DeleteField_management three times for the three diffrent feature classes, but to use a &lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d;"&gt;for loop&lt;/SPAN&gt; &lt;/STRONG&gt;and loop through all the feature classes except my creation will not work. Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Larry&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;Arden = "C:\\Projects\\TestProject.gdb\\Project\\Arden"&lt;BR /&gt;Baypoint = "C:\\Projects\\TestProject.gdb\\Project\\Baypoint"&lt;BR /&gt;Clearlake = "C:\\Projects\\TestProject.gdb\\Project\\Clearlake"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mylist = Arden, Baypoint, Clearlake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for delete in mylist:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteField_management(mylist, "Pump;Well;Tank")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Finished the Delete Function"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 16:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265440#M20421</guid>
      <dc:creator>LarryAdgate</dc:creator>
      <dc:date>2015-02-02T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python: DeleteField Management_for loop</title>
      <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265441#M20422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is helpful to post specific error messages, if any, as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing your second to last line to:&lt;/P&gt;&lt;P&gt;arcpy.DeleteField_management(delete, ["Pump", "Well", "Tank"])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 16:34:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265441#M20422</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-02-02T16:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python: DeleteField Management_for loop</title>
      <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265442#M20423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 17:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265442#M20423</guid>
      <dc:creator>LarryAdgate</dc:creator>
      <dc:date>2015-02-02T17:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python: DeleteField Management_for loop</title>
      <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265443#M20424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you're passing the wrong variable to DeleteField_management.&amp;nbsp; You want to pass the current feature class in your loop ("delete"), not the list of feature classes you're looping over.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 23:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265443#M20424</guid>
      <dc:creator>EarlSarow</dc:creator>
      <dc:date>2015-02-02T23:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python: DeleteField Management_for loop</title>
      <link>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265444#M20425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Earl, That was great information and it was enough to get me going again. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Larry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 15:41:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-deletefield-management-for-loop/m-p/265444#M20425</guid>
      <dc:creator>LarryAdgate</dc:creator>
      <dc:date>2015-02-03T15:41:09Z</dc:date>
    </item>
  </channel>
</rss>

