<?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: Working with in_memory? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/1050176#M60865</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Some more notes on in_memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="usertext"&gt;in_memory&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;workspace is only valid for geoprocessing tools; it is not a general-purpose virtual directory when you can write any data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Clean up after using "in_memory" using&amp;nbsp;Delete_management&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Projects = os.path.join("in_memory","Projects")
arcpy.MakeFeatureLayer_management(&amp;lt;pathToFC&amp;gt;,"Proj_lyr")
arcpy.CopyFeatures_management("Proj_lyr",Projects)
arcpy.Delete_management("Proj_lyr")
print("Projects Copied")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/appendices/using-the-in-memory-output-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/the-in-memory-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://gis.stackexchange.com/questions/35468/what-is-the-proper-syntax-and-usage-for-arcgis-in-memory-workspace&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/in-memory-workspace/m-p/787036&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 17:01:20 GMT</pubDate>
    <dc:creator>AndresCastillo</dc:creator>
    <dc:date>2021-04-22T17:01:20Z</dc:date>
    <item>
      <title>Working with in_memory?</title>
      <link>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/152113#M11736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How to "move" shapefile() to in_memory workspace?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I try copy, but is not supported.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 06:35:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/152113#M11736</guid>
      <dc:creator>BartłomiejStaroń</dc:creator>
      <dc:date>2012-06-04T06:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Working with in_memory?</title>
      <link>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/152114#M11737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The following code works for me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy, os &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inSHP = r"C:\tmp\myShapefile.shp" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #shapefile name &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featName = os.path.basename(inSHP) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #build path to in_memory feature clas &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inMemoryFC = os.path.join("in_memory",featName[:-4])&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(inSHP, inMemoryFC)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #OPTIONAL - check &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featCount = int(arcpy.GetCount_management(inMemoryFC).getOutput(0)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print featCount&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 06:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/152114#M11737</guid>
      <dc:creator>MarcinGasior</dc:creator>
      <dc:date>2012-06-04T06:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Working with in_memory?</title>
      <link>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/1050176#M60865</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Some more notes on in_memory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="usertext"&gt;in_memory&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;workspace is only valid for geoprocessing tools; it is not a general-purpose virtual directory when you can write any data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Clean up after using "in_memory" using&amp;nbsp;Delete_management&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Projects = os.path.join("in_memory","Projects")
arcpy.MakeFeatureLayer_management(&amp;lt;pathToFC&amp;gt;,"Proj_lyr")
arcpy.CopyFeatures_management("Proj_lyr",Projects)
arcpy.Delete_management("Proj_lyr")
print("Projects Copied")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/appendices/using-the-in-memory-output-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/the-in-memory-workspace.htm&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://gis.stackexchange.com/questions/35468/what-is-the-proper-syntax-and-usage-for-arcgis-in-memory-workspace&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/in-memory-workspace/m-p/787036&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 17:01:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/working-with-in-memory/m-p/1050176#M60865</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2021-04-22T17:01:20Z</dc:date>
    </item>
  </channel>
</rss>

