<?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 UpdateCursor and Join in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618567#M48255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to build a function that remove first and last point of lines. Soft works with SearchCursor but get 99999 error as soon as I try to use UpdateCursor. I think it could have a link with the Join but don't understand&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error occurs on UpdateCursor call when placed after join and when getvalue when UpdateCursor placer before Join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Make Feature Layer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MakeFeatureLayer_management(arc_shp, arc_layer, "", "", "ID_ARC ID_ARC VISIBLE NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MakeFeatureLayer_management(pnt_shp, pnt_layer, "", "", "ID_POINT ID_POINT VISIBLE NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#rows_arc = gp.UpdateCursor(arc_layer)&amp;nbsp; #option 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Add Join...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.QualifiedFieldNames = "UNQUALIFIED"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddJoin_management(arc_layer, "ID_ARC", tab_line, "ID_ARC", "KEEP_ALL")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddJoin_management(pnt_layer, "ID_POINT", tab_point, "ID_POINT", "KEEP_ALL")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rows_arc = gp.UpdateCursor(arc_layer) #option 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc_arc = gp.describe(arc_layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row_arc = rows_arc.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while row_arc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; feat_arc=row_arc.getvalue(desc_arc.ShapeFieldName) # Get feature geometry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So When I set option 1, UpdateCursor after join I get the error on the update call&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows_arc = gp.UpdateCursor(arc_layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I set option 1, Option 2 : UpdateCursor before join, I get the error at this line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat_arc=row_arc.getvalue(desc_arc.ShapeFieldName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I listed field names after join,&amp;nbsp; they are all there and I tried directly to set "arc.Shape" but it did'nt work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jan 2012 08:42:04 GMT</pubDate>
    <dc:creator>OlivierOlivier</dc:creator>
    <dc:date>2012-01-20T08:42:04Z</dc:date>
    <item>
      <title>UpdateCursor and Join</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618567#M48255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to build a function that remove first and last point of lines. Soft works with SearchCursor but get 99999 error as soon as I try to use UpdateCursor. I think it could have a link with the Join but don't understand&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error occurs on UpdateCursor call when placed after join and when getvalue when UpdateCursor placer before Join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Make Feature Layer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MakeFeatureLayer_management(arc_shp, arc_layer, "", "", "ID_ARC ID_ARC VISIBLE NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.MakeFeatureLayer_management(pnt_shp, pnt_layer, "", "", "ID_POINT ID_POINT VISIBLE NONE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#rows_arc = gp.UpdateCursor(arc_layer)&amp;nbsp; #option 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Add Join...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.QualifiedFieldNames = "UNQUALIFIED"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddJoin_management(arc_layer, "ID_ARC", tab_line, "ID_ARC", "KEEP_ALL")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddJoin_management(pnt_layer, "ID_POINT", tab_point, "ID_POINT", "KEEP_ALL")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rows_arc = gp.UpdateCursor(arc_layer) #option 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc_arc = gp.describe(arc_layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row_arc = rows_arc.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while row_arc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; feat_arc=row_arc.getvalue(desc_arc.ShapeFieldName) # Get feature geometry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So When I set option 1, UpdateCursor after join I get the error on the update call&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows_arc = gp.UpdateCursor(arc_layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I set option 1, Option 2 : UpdateCursor before join, I get the error at this line&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat_arc=row_arc.getvalue(desc_arc.ShapeFieldName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I listed field names after join,&amp;nbsp; they are all there and I tried directly to set "arc.Shape" but it did'nt work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2012 08:42:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618567#M48255</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2012-01-20T08:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor and Join</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618568#M48256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As far as I know it is a known bug that has yet to be addressed (not sure if it was in 10.0 SP3 though). Here's a previous discussion on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/9507-Update-cursor-on-joined-tables" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/9507-Update-cursor-on-joined-tables&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 13:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618568#M48256</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-01-24T13:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor and Join</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618569#M48257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Mathew ! I searched and didn't find this thread. So, instead of updating, I created a new shapefile. That does not work for everyone but is ok for what I wanted to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2012 15:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-and-join/m-p/618569#M48257</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2012-01-25T15:33:22Z</dc:date>
    </item>
  </channel>
</rss>

