<?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: AlterField does not work in memory in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800832#M239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked. Apparently, there is a difference. Good to know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Apr 2020 17:56:31 GMT</pubDate>
    <dc:creator>deleted-user-DOkWkfrKbyfw</dc:creator>
    <dc:date>2020-04-10T17:56:31Z</dc:date>
    <item>
      <title>AlterField does not work in memory</title>
      <link>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800829#M236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so, the following command works (env pointed to a gdb):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.management.AlterField(r'TestData_replaced', 'DMSLat','LAT_DMS','LAT_DMS')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, if the same feature class is stored in memory, and I run it, like so:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.management.AlterField(r"memory\tempDataLayer","DMSLat","LAT_DMS","LAT_DMS")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I get the following:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px; padding: 1px 0px;"&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ExecuteError&lt;/SPAN&gt;                              Traceback (most recent call last)&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;&amp;lt;ipython-input-24-5d8b88a74d08&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;----&amp;gt; 1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt; &lt;/SPAN&gt;arcpy&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;AlterField&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;r"memory\tempDataLayer"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"DMSLat"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"LAT_DMS"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;"LAT_DMS"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;AlterField&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(in_table, field, new_field_name, new_field_alias, field_type, field_length, field_is_nullable, clear_field_alias)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   4369&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; retval&lt;SPAN class="" style="color: #00a250;"&gt;   4370&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;-&amp;gt; 4371&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;raise&lt;/SPAN&gt; e&lt;SPAN class="" style="color: #00a250;"&gt;   4372&lt;/SPAN&gt; &lt;SPAN class="" style="color: #00a250;"&gt;   4373&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;@&lt;/SPAN&gt;gptooldoc&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;'AssignDefaultToField_management'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;None&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;AlterField&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(in_table, field, new_field_name, new_field_alias, field_type, field_length, field_is_nullable, clear_field_alias)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   4366&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;from&lt;/SPAN&gt; arcpy&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;arcobjects&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;arcobjectconversion &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;import&lt;/SPAN&gt; convertArcObjectToPythonObject&lt;SPAN class="" style="color: #00a250;"&gt;   4367&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;try&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;-&amp;gt; 4368&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;         &lt;/SPAN&gt;retval &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; convertArcObjectToPythonObject&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;gp&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;AlterField_management&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;*&lt;/SPAN&gt;gp_fixargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;in_table&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; field&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; new_field_name&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; new_field_alias&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; field_type&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; field_length&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; field_is_nullable&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; clear_field_alias&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;   4369&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; retval&lt;SPAN class="" style="color: #00a250;"&gt;   4370&lt;/SPAN&gt;     &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py&lt;/SPAN&gt; in &lt;SPAN class="" style="color: #60c6c8;"&gt;&amp;lt;lambda&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #0065ca; font-weight: bold;"&gt;(*args)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    509&lt;/SPAN&gt;         val &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;=&lt;/SPAN&gt; getattr&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;.&lt;/SPAN&gt;_gp&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; attr&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    510&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;if&lt;/SPAN&gt; callable&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;val&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;--&amp;gt; 511&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;             &lt;/SPAN&gt;&lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;lambda&lt;/SPAN&gt; &lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;*&lt;/SPAN&gt;args&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt; val&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;*&lt;/SPAN&gt;gp_fixargs&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;,&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;True&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    512&lt;/SPAN&gt;         &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #00a250;"&gt;    513&lt;/SPAN&gt;             &lt;SPAN class="" style="color: #007427; font-weight: bold;"&gt;return&lt;/SPAN&gt; convertArcObjectToPythonObject&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;(&lt;/SPAN&gt;val&lt;SPAN class="" style="color: #b27d12; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #b22b31; font-weight: bold;"&gt;ExecuteError&lt;/SPAN&gt;: ERROR 000664: Invalid input: The type of dataset is not supported. Failed to execute (AlterField).&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have tried it in Jupyter and in the Python pane in ArcGIS Pro. It seems like it wants a PATH and memory is not considered one. Has anyone had success here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 13:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800829#M236</guid>
      <dc:creator>deleted-user-DOkWkfrKbyfw</dc:creator>
      <dc:date>2020-04-10T13:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: AlterField does not work in memory</title>
      <link>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800830#M237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried "in_memory"?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/appendices/using-the-in-memory-output-workspace.htm"&gt;Considerations when using the in_memory workspace&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800830#M237</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2020-04-10T17:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: AlterField does not work in memory</title>
      <link>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800831#M238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tried in_memory, because memory is supposed to work in Pro like in_memory in arcMap. I will check though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800831#M238</guid>
      <dc:creator>deleted-user-DOkWkfrKbyfw</dc:creator>
      <dc:date>2020-04-10T17:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: AlterField does not work in memory</title>
      <link>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800832#M239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked. Apparently, there is a difference. Good to know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2020 17:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/alterfield-does-not-work-in-memory/m-p/800832#M239</guid>
      <dc:creator>deleted-user-DOkWkfrKbyfw</dc:creator>
      <dc:date>2020-04-10T17:56:31Z</dc:date>
    </item>
  </channel>
</rss>

