<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4842087529169691487</id><updated>2024-08-31T19:05:33.052-04:00</updated><category term="arcpy"/><category term="arcpy in eclipse"/><category term="arcpy with pydev"/><category term="debug arcpy"/><category term="debugging arcgis scripts"/><category term="eclipse"/><category term="python"/><title type='text'>LET&#39;S TALK GIS</title><subtitle type='html'>A GIS blog to share ideas and encourage collaboration between GIS professionals.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://talkgis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4842087529169691487/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://talkgis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dunielquis</name><uri>http://www.blogger.com/profile/12906375468248503974</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4842087529169691487.post-2092069236356296099</id><published>2011-11-20T18:53:00.001-05:00</published><updated>2012-01-27T19:35:33.094-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arcpy"/><category scheme="http://www.blogger.com/atom/ns#" term="arcpy in eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="arcpy with pydev"/><category scheme="http://www.blogger.com/atom/ns#" term="debug arcpy"/><category scheme="http://www.blogger.com/atom/ns#" term="debugging arcgis scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Writing and debugging ArcGIS python scripts with Eclipse  or Aptana IDE</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;Writing and debugging complex ArcGIS python scripts that interact with other classes and packages can sometimes be a real ordeal if you don&#39;t have the right tools. For that reason, sometime ago I decided to try to come up with a way that enables me to &amp;nbsp;use a complete Software IDE suite such as Eclipse or Aptana.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;1- First step is to get Eclipse IDE&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Go to &lt;a href=&quot;http://www.eclipse.org/downloads/packages/&quot;&gt;Eclipse.org&lt;/a&gt;&amp;nbsp;and download
Eclipse Classic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Unzip
downloaded file to a preferred location (C:\Eclipse for instance)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Start
Eclipse by running Eclipse.exe (You can create a shortcut on your desktop.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;2- Once Eclipse is running you will need to install
&lt;b&gt;PyDev&lt;/b&gt; plugin for Eclipse. This step is not required for Aptana users (PyDev is pre-installed with it)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Go to Help --&amp;amp;gt; Install
New Software and then click Add. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Add a
name and set the location to &lt;a href=&quot;http://pydev.org/updates&quot;&gt;http://pydev.org/updates&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Click OK.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;file://localhost/Users/dllauge/Library/Caches/TemporaryItems/msoclip/0clip_image002.gif&quot; v:shapes=&quot;_x0000_i1025&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNktQmUbu_io6eNuIuK6zVE8u0PqePTX4Q2xzVTQ0dethqbuZiEHtlk_PUkWN1qcTpv8Io9T4sgTKL3tcFl1WUol_CVgsNoPNN2JoKP68_DaPckZWOxzorE2hQRvgzd1SvIl43teEoAI0/s1600/p1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNktQmUbu_io6eNuIuK6zVE8u0PqePTX4Q2xzVTQ0dethqbuZiEHtlk_PUkWN1qcTpv8Io9T4sgTKL3tcFl1WUol_CVgsNoPNN2JoKP68_DaPckZWOxzorE2hQRvgzd1SvIl43teEoAI0/s1600/p1.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3- Select PyDev (PyDev Mylyn Integration is
optional) then click on Next.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjUnHxo6BBCMpv2M1xpTFG-agxsEcmvHinDORxGCrNkvq1QSQMWx8uwgrLNIXqme2-QH_TRb5yYL7FrQeqno1n17fN8I3zWhf3guU8A3C35onl6kNEpzvO3q82FKrQrkXebXDpaiWyhEA/s1600/p2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjUnHxo6BBCMpv2M1xpTFG-agxsEcmvHinDORxGCrNkvq1QSQMWx8uwgrLNIXqme2-QH_TRb5yYL7FrQeqno1n17fN8I3zWhf3guU8A3C35onl6kNEpzvO3q82FKrQrkXebXDpaiWyhEA/s1600/p2.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;4- Accept the license agreement then click finish.
After installation is completed, restart Eclipse.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;5- With Eclipse or Aptana running open the
PyDev Perspective.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; -Click on Open Perspective then select PyDev. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8mGCUK4JBn0xSBDUc53mHzfLWq2bLdi95kSwTfPG_J3yOkVZFmTUulSX8cUfnS8xpJMAbC9cxhuv-2GrFcYs-EGcf2MYuvgB5p1GDGpluXHe7C2Qr38j5KqfuauqtqZJ9uI9B97BxRt0/s1600/p3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8mGCUK4JBn0xSBDUc53mHzfLWq2bLdi95kSwTfPG_J3yOkVZFmTUulSX8cUfnS8xpJMAbC9cxhuv-2GrFcYs-EGcf2MYuvgB5p1GDGpluXHe7C2Qr38j5KqfuauqtqZJ9uI9B97BxRt0/s1600/p3.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;6- Now go to File -&amp;amp;gt; New (or Alt + Shift + N) and
Select PyDev Project to create a new Python project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp; - Name the
project and click the link to configure the python interpreter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxf5MBNILVjKfdiH0rYyrF3sGZfo7znuYW_LP4lPIRwlRc_yn65gQBYj9v1uVF0HFou675YBm476Fsb6XrVZQwB9e6MTJWNLEPW0U9D6gJAk6TQvqoub6eWU667HALmpFjFFPABwyIejI/s1600/p4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxf5MBNILVjKfdiH0rYyrF3sGZfo7znuYW_LP4lPIRwlRc_yn65gQBYj9v1uVF0HFou675YBm476Fsb6XrVZQwB9e6MTJWNLEPW0U9D6gJAk6TQvqoub6eWU667HALmpFjFFPABwyIejI/s1600/p4.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;7- Click on New and Navigate to the Python installation
that comes with ArcGIS software (See screenshots below.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsgy_93sL7ICPFViSHl5iwHpy875Rd7xxZ1ZOt0Wn_FCKj8rzGZmF8ETKLd0kTpaCCoRw9ZWtqnizr7cKiWz7JGojazdRVEvJ2vhG8bkZkB31bjv_T_le6IEFJ6rWZKkexVprWJY_qfOk/s1600/p5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsgy_93sL7ICPFViSHl5iwHpy875Rd7xxZ1ZOt0Wn_FCKj8rzGZmF8ETKLd0kTpaCCoRw9ZWtqnizr7cKiWz7JGojazdRVEvJ2vhG8bkZkB31bjv_T_le6IEFJ6rWZKkexVprWJY_qfOk/s1600/p5.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP2zA6LwPd4tBygZI6hEdGdXUrnbcj5keVWi5f82alVNf4WABHiPHreZUw3y_LEx4ZQPyQAorbzjh3Ln1EIVOmuc1tmdcaChylM2HLd7keU5d2bV3MvtXvTXyC8QR7Tswi232jvwme6no/s1600/p6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP2zA6LwPd4tBygZI6hEdGdXUrnbcj5keVWi5f82alVNf4WABHiPHreZUw3y_LEx4ZQPyQAorbzjh3Ln1EIVOmuc1tmdcaChylM2HLd7keU5d2bV3MvtXvTXyC8QR7Tswi232jvwme6no/s1600/p6.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;8- Select &lt;b&gt;All&lt;/b&gt;
folder then click OK to add them to the python path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiHmRTRl-wMPPZAYMFLhXita2FRq-CZSGpyQl9s8z-jciaXJjLoHLnI3bZF6GZU0foQDCzvFZoY9mOsw7yxZfLEttr5kkVJEECjiNCEhOwq7OU7gdqlku0uVy9teFLdY2GiMoYXIfUHP4/s1600/p7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiHmRTRl-wMPPZAYMFLhXita2FRq-CZSGpyQl9s8z-jciaXJjLoHLnI3bZF6GZU0foQDCzvFZoY9mOsw7yxZfLEttr5kkVJEECjiNCEhOwq7OU7gdqlku0uVy9teFLdY2GiMoYXIfUHP4/s1600/p7.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;9- Click Apply and wait for the interpreter to be
configured.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji0BgpNjIJbe36ZWhutC7Gyd9gMUgYIGMfKPl16RhXNsrscKYuSq5TyOT-lXdMNF0neTjOkqIiLzGTGfUHlbqtPQRy1GQTqBmnOBZe9_BIYvlDH-yPiJFUaYBmmDc1l7D9C3SGXLXbY-o/s1600/p8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji0BgpNjIJbe36ZWhutC7Gyd9gMUgYIGMfKPl16RhXNsrscKYuSq5TyOT-lXdMNF0neTjOkqIiLzGTGfUHlbqtPQRy1GQTqBmnOBZe9_BIYvlDH-yPiJFUaYBmmDc1l7D9C3SGXLXbY-o/s320/p8.png&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;10 - After the force built-in is completed, your
PyDev Project should show the path to the python executable folder. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; - Right
Click the project name and add a new PyDev Package&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; - Then add
new PyDev Module&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYM5ofPnJSbgWo_PgSNBxbDua8UdBPiGZKh50ZIuyAzdxEUf96d1CZ-BXPdaWMXlTNvI0No1lXKM0HWVkH6wNWmrNkeiBYusJ5EvrqWqz_Nzc0esF-y5-Xqix_s9mowcfI4PGKmBOc_GI/s1600/p9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYM5ofPnJSbgWo_PgSNBxbDua8UdBPiGZKh50ZIuyAzdxEUf96d1CZ-BXPdaWMXlTNvI0No1lXKM0HWVkH6wNWmrNkeiBYusJ5EvrqWqz_Nzc0esF-y5-Xqix_s9mowcfI4PGKmBOc_GI/s1600/p9.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;11- Import the arcpy library into your python module.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - From this
point, code completion should work for arcpy modules too.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidzSvUgtn5ooFal51n2ubjUuwc-B4RWMzqCvXQow1zJaCZBOrROgudoiF3IH6uZRkslKIcnodSrjv_uYQxfwSVJKgKnDMUtbI_RX1Y0v3BxWA5hjifIh9pqANmaj3nodPy6P6AlRZm2Ac/s1600/p10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidzSvUgtn5ooFal51n2ubjUuwc-B4RWMzqCvXQow1zJaCZBOrROgudoiF3IH6uZRkslKIcnodSrjv_uYQxfwSVJKgKnDMUtbI_RX1Y0v3BxWA5hjifIh9pqANmaj3nodPy6P6AlRZm2Ac/s1600/p10.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;12- Add some code, set a breakpoint, and then Click
Run -&amp;amp;gt; Debug As -&amp;amp;gt; Python Run.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Eclipse
IDE will ask you to switch to debugging perspective.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Click OK &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 30.0pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -.25in;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;-&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;At this
point you should be able to use all the development and debugging features that
come with Eclipse IDE. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none; text-indent: -.5in;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZo9L0QXzksV__QS9GgCTPFzPuTMl-zR06vmHkl2UgLghKDoG0nkUITy5xpsafa-E5hIIhgmKLs-VRci4K1RK624zWv95HbHk3leNLnKrMz5ZLXnozHvojX6Ad3X0Uw6pvr5OVPPjVuE/s1600/p11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZo9L0QXzksV__QS9GgCTPFzPuTMl-zR06vmHkl2UgLghKDoG0nkUITy5xpsafa-E5hIIhgmKLs-VRci4K1RK624zWv95HbHk3leNLnKrMz5ZLXnozHvojX6Ad3X0Uw6pvr5OVPPjVuE/s1600/p11.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://talkgis.blogspot.com/feeds/2092069236356296099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://talkgis.blogspot.com/2011/11/writing-and-debugging-arcgis-python.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4842087529169691487/posts/default/2092069236356296099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4842087529169691487/posts/default/2092069236356296099'/><link rel='alternate' type='text/html' href='http://talkgis.blogspot.com/2011/11/writing-and-debugging-arcgis-python.html' title='Writing and debugging ArcGIS python scripts with Eclipse  or Aptana IDE'/><author><name>Dunielquis</name><uri>http://www.blogger.com/profile/12906375468248503974</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNktQmUbu_io6eNuIuK6zVE8u0PqePTX4Q2xzVTQ0dethqbuZiEHtlk_PUkWN1qcTpv8Io9T4sgTKL3tcFl1WUol_CVgsNoPNN2JoKP68_DaPckZWOxzorE2hQRvgzd1SvIl43teEoAI0/s72-c/p1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4842087529169691487.post-812269247188080668</id><published>2010-05-23T23:29:00.004-04:00</published><updated>2010-05-25T21:44:25.295-04:00</updated><title type='text'>Adding fields to tables and feature classes in a geodatabase using python script</title><content type='html'>&lt;div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this post we are going to add X and Y coordinates fields to existing tables and feature class in a File Geodatabase programatically.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1- &lt;strong&gt;We start by creating a xml document with the different field&#39;s properties, we&#39;ll be adding.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6A8Xj23H7NoK0vuCHRxW_nBUxiEZLQ1MwDleomZfekIkCV_A2ic3cSxApAJx3rMyUUZAZhz1oWzdJmGyJKO_RPXFY4GU9-NUltnlg07-Rf7__1k6g1j3HP8vFQZgS8nKrnY4OY8fP-1w/s1600/xanyfields.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; gu=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6A8Xj23H7NoK0vuCHRxW_nBUxiEZLQ1MwDleomZfekIkCV_A2ic3cSxApAJx3rMyUUZAZhz1oWzdJmGyJKO_RPXFY4GU9-NUltnlg07-Rf7__1k6g1j3HP8vFQZgS8nKrnY4OY8fP-1w/s320/xanyfields.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2- &lt;strong&gt;Now let&#39;s create a python list&amp;nbsp;with the two fields by parsing the xml file&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;#parse Xml file from physical path into memory &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;root = elementTree.parse(pathToXmlFile)&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;#get the fields&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;fields = root.getiterator(&lt;span style=&quot;color: #38761d;&quot;&gt;&#39;field&#39;&lt;/span&gt;) &lt;span style=&quot;color: #666666;&quot;&gt;# Returns list of all fields&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #666666;&quot;&gt;#iterate thru each node &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;for node in fields:&lt;br /&gt;
&amp;nbsp; field = node&lt;br /&gt;
&amp;nbsp; theFieldList = []&lt;br /&gt;
&amp;nbsp; for i in range(len(field)): &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theFieldList.insert(i, field[i].text)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; listOfFields.append(theFieldList&lt;span style=&quot;color: #666666;&quot;&gt;)#append field to the list&lt;/span&gt;&lt;br /&gt;
3- &lt;strong&gt;Then we create a list of feature classes&amp;nbsp; and tables we are going to be adding the fields&lt;/strong&gt;fcList = [&lt;span style=&quot;color: #274e13;&quot;&gt;&#39;fds\\fc1&#39;, &#39;fc2&#39;, &#39;table1&#39;&lt;/span&gt;]&lt;br /&gt;
4- &lt;strong&gt;Then we add the fields&lt;/strong&gt;if len(Fields) &amp;gt; 0:&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #666666;&quot;&gt;#iterate thru fields&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for field in Fields:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #666666;&quot;&gt;#get fields here&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_name = str(field[0])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_type = str(field[1])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_precision = str(field[2])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_scale = str(field[3])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_length = str(field[4])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_alias = str(field[5])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_is_nullable = str(field[6])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_is_required =str(field[7])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_domain = str(field[8])&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #666666;&quot;&gt;#add field&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gp.addfield(fc, field_name, field_type, field_precision, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_scale,&amp;nbsp;field_length, field_alias,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_is_nullable, field_is_required, &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field_domain) &lt;br /&gt;
&lt;br /&gt;
Here is the complete code &lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68_IWbcQ4q7zmAYvpABfflLmo8kEYSHP9TQHH6tU0XCiEwaGxQVP8h5GjQHyz_ePDjQCL4bV7GE8Plcgt_vl3T1umwzC4mS7YDhpJi9LtzX1FarW-Xr80Lg4hsbiWsjCfCne6RREsi1U/s1600/code.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; gu=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68_IWbcQ4q7zmAYvpABfflLmo8kEYSHP9TQHH6tU0XCiEwaGxQVP8h5GjQHyz_ePDjQCL4bV7GE8Plcgt_vl3T1umwzC4mS7YDhpJi9LtzX1FarW-Xr80Lg4hsbiWsjCfCne6RREsi1U/s320/code.jpg&quot; title=&quot;Click image to enlarge&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://talkgis.blogspot.com/feeds/812269247188080668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://talkgis.blogspot.com/2010/05/adding-fields-to-tables-and-feature.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4842087529169691487/posts/default/812269247188080668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4842087529169691487/posts/default/812269247188080668'/><link rel='alternate' type='text/html' href='http://talkgis.blogspot.com/2010/05/adding-fields-to-tables-and-feature.html' title='Adding fields to tables and feature classes in a geodatabase using python script'/><author><name>Dunielquis</name><uri>http://www.blogger.com/profile/12906375468248503974</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6A8Xj23H7NoK0vuCHRxW_nBUxiEZLQ1MwDleomZfekIkCV_A2ic3cSxApAJx3rMyUUZAZhz1oWzdJmGyJKO_RPXFY4GU9-NUltnlg07-Rf7__1k6g1j3HP8vFQZgS8nKrnY4OY8fP-1w/s72-c/xanyfields.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>