<?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: Update Feature Class Attributes Automatically in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116567#M9161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mathew - I am not familiar with dictionaries when it comes to dealing with Python scripting and ArcGIS. Is there some reference material on the web you can point me to that I can do some "Homework" on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jake - Currently - I am running the File Geodatabase through a network connection from our internal server. Not ArcGIS Server. I can test your thought by putting the geodatabase onto my hard drive and see if that speeds things up. Than - I need to create a task to update the "Production" Geodatabase on our network since that is the one that is used to produce the maps for our operations staff at night.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the ideas. I am experimenting with different things to see what will work better/quicker.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Oct 2012 13:53:01 GMT</pubDate>
    <dc:creator>ModernElectric</dc:creator>
    <dc:date>2012-10-26T13:53:01Z</dc:date>
    <item>
      <title>Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116558#M9152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am working on a work-flow process that will automatically update the attributes of a specific feature class from a scheduled python script that will run overnight. Here is what I am trying to accomplish:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Class: Service Locations (Electric Meter Locations with account, meter and location data stored in our CIS system.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I currently have a python script the pulled the data from our Oracle System and produces it into a Geodatabase table that sits in the same geodatabase as the Service Location feature class. What I need to do is to take the individual fields from the table and update the fields in the feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I have done:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I made a data model through model builder to 1) Make a Feature Layer 2) Add Join 3) Calculate Field (Update the feature class field with the same field from the data table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem is - when I run the data model or the script - it takes a LONG time. The one script I build and tested only have 7 fields (so 7 Calculate Field processes) and it took about 4 hours to run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an easier way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advanced&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 17:05:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116558#M9152</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-25T17:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116559#M9153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What type of geodatabase are you using (i.e. ArcSDE for Oracle, File Geodatabase)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of ArcGIS are you running?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 17:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116559#M9153</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-10-25T17:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116560#M9154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Chris,&lt;BR /&gt;&lt;BR /&gt;What type of geodatabase are you using (i.e. ArcSDE for Oracle, File Geodatabase)?&lt;BR /&gt;&lt;BR /&gt;What version of ArcGIS are you running?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently using a File Geodatabase - single use license on ArcMap 10 - ArcEditor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 17:36:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116560#M9154</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-25T17:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116561#M9155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How many features are you updating?&amp;nbsp; Even if it's thousands it should take 4 seconds, not 4 hours...&amp;nbsp; By the way, the da.updatecursor will be a lot faster than the older non-da cursor.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 19:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116561#M9155</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2012-10-25T19:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116562#M9156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How many features are you updating?&amp;nbsp; Even if it's thousands it should take 4 seconds, not 4 hours...&amp;nbsp; By the way, the da.updatecursor will be a lot faster than the older non-da cursor.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My Service_Location feature class has around 9600 features (or 9600 meter locations). After going back to reviewing the log I created for the script it showed that each field took around 15 minutes to run through the "Calculate Field" tool in the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;da.updatecursor vs non-da cursor????????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am far from being an expert on Python. I basically built a model from model builder - exported it out to a python script, found out how to add a create log feature and I had my script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 19:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116562#M9156</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-25T19:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116563#M9157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My Service_Location feature class has around 9600 features&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unless you are calculating pi to 1000 decimal places for each row that should be a matter of seconds, not hours. I have a script that takes 2 hours that calculates 17 fields for nearly 1 million features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Post your code and I'm sure someone will be able to figure out where the problem is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;da.updatecursor vs non-da cursor????????&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a new method of accessing data using cursors in 10.1. If you are on 10.0 you don't need to worry about it as only regular cursors are available.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 19:34:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116563#M9157</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-10-25T19:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116564#M9158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unless you are calculating pi to 1000 decimal places for each row that should be a matter of seconds, not hours. I have a script that takes 2 hours that calculates 17 fields for nearly 1 million features.&lt;BR /&gt;&lt;BR /&gt;Post your code and I'm sure someone will be able to figure out where the problem is.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay - great. What "ArcTools" if any are you using to do that? I am using Calculate Field and writing an Expression saying to take this field from the table to put it into this field inside the feature class. For each field to do all 9600 features it takes a good 15 to 20 minutes. Is there something I am not doing right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 19:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116564#M9158</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-25T19:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116565#M9159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Okay - great. What "ArcTools" if any are you using to do that? I am using Calculate Field and writing an Expression saying to take this field from the table to put it into this field inside the feature class. For each field to do all 9600 features it takes a good 15 to 20 minutes. Is there something I am not doing right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I posted the essence of my solution in the linked thread below to calculate a few of the fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/55099-Update-cursor-with-joined-tables-work-around-w-dictionaries"&gt;http://forums.arcgis.com/threads/55099-Update-cursor-with-joined-tables-work-around-w-dictionaries&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 19:50:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116565#M9159</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-10-25T19:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116566#M9160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Okay - great. What "ArcTools" if any are you using to do that? I am using Calculate Field and writing an Expression saying to take this field from the table to put it into this field inside the feature class. For each field to do all 9600 features it takes a good 15 to 20 minutes. Is there something I am not doing right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you accessing the File Geodatabase over a network?&amp;nbsp; If so, can you copy the File Geodatabase to your local disk and see if performance is the same?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 11:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116566#M9160</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-10-26T11:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116567#M9161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mathew - I am not familiar with dictionaries when it comes to dealing with Python scripting and ArcGIS. Is there some reference material on the web you can point me to that I can do some "Homework" on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jake - Currently - I am running the File Geodatabase through a network connection from our internal server. Not ArcGIS Server. I can test your thought by putting the geodatabase onto my hard drive and see if that speeds things up. Than - I need to create a task to update the "Production" Geodatabase on our network since that is the one that is used to produce the maps for our operations staff at night.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the ideas. I am experimenting with different things to see what will work better/quicker.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 13:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116567#M9161</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-26T13:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update Feature Class Attributes Automatically</title>
      <link>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116568#M9162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Negative Jake - I went through and copied the geodatabase and .MXD and put it onto my hard drive and rebuilt the data model in model builder and it is taking just as long. I am using the "Calculate Field" tool and saying I want this field from the Feature Layer to update/replace from the field in the table. Is there a different tool I can use?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 15:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-feature-class-attributes-automatically/m-p/116568#M9162</guid>
      <dc:creator>ModernElectric</dc:creator>
      <dc:date>2012-10-26T15:43:08Z</dc:date>
    </item>
  </channel>
</rss>

