<?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: Problems with 'in_memory' workspace in ArcGIS Pro? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614012#M20395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... I was trying to figure out what was going on with the copying first to a geodatabase, then to in_memory several time, followed by the note of confusion and the plea to Daryl (which you will serve as an admirable substitute).&amp;nbsp; My question was what was the question, since nothing seemed to be done with the result object OR there was confusion as to what a Result object was and what you could do with it,... ergo, y two links.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2015 22:48:25 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-10-29T22:48:25Z</dc:date>
    <item>
      <title>Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614008#M20391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having terrible troubles with the 'in_memory' workspace.&amp;nbsp; Anyone else?&amp;nbsp; ArcGIS Pro 1.1, fully patched, new install.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="134145" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/134145_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Humunuh?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daryl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 20:56:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614008#M20391</guid>
      <dc:creator>FWSDOWNLOAD</dc:creator>
      <dc:date>2015-10-29T20:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614009#M20392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might have better luck tagging &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 21:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614009#M20392</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2015-10-29T21:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614010#M20393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in_memory&amp;nbsp; &lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/the-in-memory-workspace.htm" title="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/the-in-memory-workspace.htm"&gt;The in_memory workspace—ArcGIS Pro | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;returns a Result object &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/classes/result.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/classes/result.htm"&gt;Result—ArcPy Classes | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you got them, not go get them as in the code examples at the bottom of the last link ( ie getOutput, print etc)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 21:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614010#M20393</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-29T21:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614011#M20394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, I think the issue is that even though the Copy Management output is pointing to 'in_memory' it is being saved to a physical GDB. Or, perhaps I'm misunderstanding the Result object - I assume the response to getOutput would be the layer held in that GDB, not 'in_memory' where it should be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daryl, is the GDB set as your default GDB, or otherwise, why is this the location? Have you set it as some other type of environment? I'm not on Pro, so can't test anything, but you're right, something fishy is going on - your code works as expected (saving to 'in_memory') in ArcGIS 10.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 22:26:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614011#M20394</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-10-29T22:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614012#M20395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... I was trying to figure out what was going on with the copying first to a geodatabase, then to in_memory several time, followed by the note of confusion and the plea to Daryl (which you will serve as an admirable substitute).&amp;nbsp; My question was what was the question, since nothing seemed to be done with the result object OR there was confusion as to what a Result object was and what you could do with it,... ergo, y two links.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 22:48:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614012#M20395</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-29T22:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614013#M20396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be helpful if you stated what you expected the results to be versus what you are seeing.&amp;nbsp; Given the code you provided, people could assume what you expected for results, but it is just so much easier to explicitly state it.&amp;nbsp; That said, assuming has never stopped me....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;assume&lt;/EM&gt; what is confusing to you is that you can continue to create the same table over and over &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; and that it never generates an error.&amp;nbsp; Using a similar but slightly different example, it is illustrative to compare using &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; in the interactive Python window (which is what I assume you are doing) and using &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; in the accompanying, standalone Python interpreter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interactive Python window:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CreateTable_management('in_memory', 'tmpTable')
&amp;lt;Result 'C:\\Users\\jbixby\\Documents\\ArcGIS\\Projects\\MyProject\\MyProject.gdb\\tmpTable0'&amp;gt;
arcpy.Exists('in_memory/tmpTable')
False&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standalone Python interpreter:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.CreateTable_management('in_memory', 'tmpTable')
&amp;lt;Result 'in_memory\\tmpTable'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.Exists('in_memory/tmpTable')
True&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing, or should I say assuming, you and most others would expect the results from the standalone Python interpreter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before getting to my main point, there are a couple of minor points to cover in the code examples above.&amp;nbsp; First, one can see that using &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; in the interactive Python window is actually creating the table on-disk, not in-memory.&amp;nbsp; Given that &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; means on-disk and not in-memory in the interactive Python window, it is possible to create the same table over and over because each call using &lt;SPAN style="font-family: courier new,courier;"&gt;in_memory&lt;/SPAN&gt; isn't actually referencing the same place, well, the same object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the logical question is why&lt;SPAN style="font-family: courier new,courier;"&gt; in_memory&lt;/SPAN&gt; doesn't actually mean in-memory with the interactive Python window in ArcGIS Pro.&amp;nbsp; The answer, which is basically undocumented, can be found by looking at the recently updated documentation on &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/executing-tools/foreground-and-background-processing.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Foreground and background processing &lt;/A&gt;in ArcGIS Desktop.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;Using the in-memory workspace with background processing&lt;/SPAN&gt;&lt;BR /&gt;....&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Background processing is a separate process from ArcMap or ArcCatalog. These processes cannot share memory (RAM). When a tool is executed, the data it uses must be opened by the background processes. So, an input feature class will be opened directly by the background processes, but layers in ArcMap must follow a different path....&lt;/LI&gt;&lt;LI&gt;Most of the Create tools, such as Create File GDB and Create Feature Class take two input parameters (a workspace and a name) to derive a new output. These tools allow you to input in_memory as the workspace. However, when executed in the background, the newly created output will always have the result returned as a location on disk, even if in_memory is used as the workspace. These tools are better used as part of a workflow in ModelBuilder or a Python script tool where the in-memory workspace can be used throughout the entire execution of the tool.&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears, and I say appears because I haven't found good documentation yet, that ArcGIS Pro uses something similar to 'background processing' in ArcGIS Desktop.&amp;nbsp; Unlike ArcGIS Desktop where the user can choose between foreground and background processing under the Geoprocessing options, there is no choice in ArcGIS Pro, or at least that I have found yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:15:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614013#M20396</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T02:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614014#M20397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Threading.... ??? &lt;A href="http://blogs.esri.com/esri/arcgis/2015/02/06/analysis-geoprocessing-in-arcgis-pro-frequently-asked-questions/" title="http://blogs.esri.com/esri/arcgis/2015/02/06/analysis-geoprocessing-in-arcgis-pro-frequently-asked-questions/"&gt;Analysis &amp;amp; Geoprocessing in ArcGIS Pro: Frequently Asked Questions | ArcGIS Blog&lt;/A&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;ArcMap and ArcGIS Pro are built on different technologies. &lt;/SPAN&gt;&lt;EM style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;Off the shelf&lt;/EM&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt; (my.esri.com is a shelf, right?), geoprocessing in ArcGIS Pro is 64-bit and does not block the application while a tool is running — this is what it means to be &lt;/SPAN&gt;&lt;EM style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;multithreaded&lt;/EM&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;. ArcMap has a different technology to accomplish the same goal, called background geoprocessing, which was introduced in ArcGIS Desktop 10.0. You can download and install a 64-bit version of this technology, separate from the main installation of ArcMap. Learn more about that &lt;/SPAN&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/executing-tools/64bit-background.htm" style="color: #007ac2; font-family: Arial, Helvetica, sans-serif;" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the knowledge base article ... &lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/42769" title="http://support.esri.com/en/knowledgebase/techarticles/detail/42769"&gt;42769 - What happened to background geoprocessing in ArcGIS Pro?&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 02:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614014#M20397</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-10-30T02:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614015#M20398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really don't think it is good practice to set env.workspace to the current or scratch workspace. I remember reading somewhere (don't remember where) a warning not to do this.&amp;nbsp; From my experience since, I still think it's simply dangerous... as you really should keep track of what gets put there.&amp;nbsp; I think it's best to reference it explicitly -- as shown in &lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/the-in-memory-workspace.htm#ESRI_SECTION1_51638127F5D8473EA669F443388F8227" rel="nofollow noopener noreferrer" target="_blank"&gt;the example in the help.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my almost 30 !!! years of working with GIS software and data has taught me anything, it's to avoid tempting fate. Life is difficult enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was intrigued by Joshua's and Dan's discussion.. so I experimented a little.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcMap 10.2.2 python window, background processing disabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; env.workspace = "in_memory"
&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management("Robbinsdale_poly", "test")
&amp;lt;Result 'in_memory\\test'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.Describe("test").catalogPath
&lt;SPAN style="color: #acacac;"&gt;u'in_memory\\test'&lt;/SPAN&gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management("Robbinsdale_poly", "test")
&amp;lt;Result 'in_memory\\test'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.Describe("test").catalogPath
&lt;SPAN style="color: #acacac;"&gt;u'in_memory\\test'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, run a second time I get the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I enabled background GP&amp;nbsp; (Geoprocessing/Options) I see something interesting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management("Robbinsdale_poly", "test1")
&amp;lt;Result 'in_memory\\test1'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.Describe("test1").catalogPath
u'in_memory\\test1'
&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management("Robbinsdale_poly", "test1")
&amp;lt;Result 'in_memory\\test1'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.Describe("test1").catalogPath
u'C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\arc12\\j04f737a2d9c94f3c983dd0072ee2cc01.gdb\\test1'&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My theory is that since the overwrite had to be done, the background and foreground had to share the data, and to do that the data had to be written to disk so the threads could know about each other's datasets. Or perhaps this is forced by the requirement to share layers between ArcMap and the background GP process (which keeps idling ready to do more stuff after it is launched the first time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also Joshua is may be onto something here:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;it is possible to create the same table over and over because each call using &lt;SPAN style="font-style: inherit; font-family: 'courier new', courier;"&gt;in_memory&lt;/SPAN&gt; isn't actually referencing the same place, well, the same object.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;This may explain the app instability when using in_memory if you don't explicitly delete what you create there, like you do when you run a model tool that uses in_memory for intermediate datasets (or very careful Python scripting with try/except/finally to make sure all temp layers and files are deleted).&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Pro is a fully multi-threaded application, which makes the issue of in_memory as current workspace even &lt;EM&gt;more&lt;/EM&gt; problematic as you can't easily share memory data among the many threads that make up the application. (Dan thanks for the link to the &lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/42769" rel="nofollow noopener noreferrer" target="_blank"&gt;useful KB article.&lt;/A&gt;) Within a script process (which is all in one thread) you're probably okay, but the workspace environment may be shared among the many threads so you are asking for trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ArcMap they can handle it because there are only two processes to work with -- but with Pro it's a bridge too far when working with the multi-threaded app.... in a way, in Pro, &lt;EM&gt;everything is run in the background. &lt;/EM&gt;(Sort of, as technically Pro is multi threads not separate processes.) According to the &lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/42769" rel="nofollow noopener noreferrer" target="_blank"&gt;KB article Dan linked&lt;/A&gt; it looks like the developers are simply not supporting in_memory at the Pro command line or when running tools interactively:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: Arial, Helvetica, sans-serif;"&gt;The in memory workspace option is available for models and scripts in which it is used as intermediate storage for tools chained in sequence. &lt;STRONG&gt;When running tools individually in the Geoprocessing pane or from a Python window, the project default geodatabase is substituted for the in_memory workspace.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is probably just as well -- the in_memory workspace is treated lightly at your peril. If you put too much data there, or neglect to clean up, your process can run out of space and crash the entire show. No one likes to see the app window suddenly vanish. Within a script or model, you can be more careful to always clean up after yourself than running stuff interactively.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614015#M20398</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T02:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614016#M20399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might be missing the fine details, but it seems to me you can use in_memory as the workspace environment in ArcMap (although you bring up valid reasons why not to do so):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = 'in_memory'
&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management("Flood200yr_0cm",'copy')
&amp;lt;Result 'in_memory\\copy'&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614016#M20399</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T02:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614017#M20400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I looked and did some tests (see my edited post), and revised my remarks. Learned some stuff tonight!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 05:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614017#M20400</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-10-30T05:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614018#M20401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, &lt;A href="https://community.esri.com/migrated-users/3355"&gt;Curtis Price&lt;/A&gt;​. Interesting complexity intrinsic in the simplified (my words) product.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 05:34:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614018#M20401</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-10-30T05:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614019#M20402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And it plays nice with numpy as well&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; src = r"F:\Writing_Projects\ArcProjects\Shapefiles\Polygon\AOI_mtm9.shp"
&amp;gt;&amp;gt;&amp;gt; copy = r"F:\Test\AOI_copy.shp"
&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = "in_memory"
&amp;gt;&amp;gt;&amp;gt; # .... now using ArcMap 10.3.1 and in_memory .....
&amp;gt;&amp;gt;&amp;gt; arcpy.CopyFeatures_management(copy,"AOI_clone")
&amp;lt;Result 'in_memory\\AOI_clone'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.FeatureVerticesToPoints_management("AOI_clone", "in_memory/AOI_pnts", "ALL")
&amp;lt;Result 'in_memory\\AOI_pnts'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; import numpy as np
&amp;gt;&amp;gt;&amp;gt; arr = arcpy.da.FeatureClassToNumPyArray("in_memory/AOI_pnts", "*") # recover all fields
&amp;gt;&amp;gt;&amp;gt; arr
array([(1, [340000.0, 5022000.0], 0, 342000.0, 5024000.0, 16000000.0, 1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (2, [340000.0, 5026000.0], 0, 342000.0, 5024000.0, 16000000.0, 1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (3, [344000.0, 5026000.0], 0, 342000.0, 5024000.0, 16000000.0, 1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (4, [344000.0, 5022000.0], 0, 342000.0, 5024000.0, 16000000.0, 1),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (5, [340000.0, 5022000.0], 0, 342000.0, 5024000.0, 16000000.0, 1)],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtype=[('FID', '&amp;lt;i4'), ('Shape', '&amp;lt;f8', (2,)), ('Id', '&amp;lt;i4'), ('X_c', '&amp;lt;f8'), ('Y_c', '&amp;lt;f8'), ('area', '&amp;lt;f8'), ('ORIG_FID', '&amp;lt;i4')])
&amp;gt;&amp;gt;&amp;gt; # note ... ORIG_FID is produced since 5 points are associated
&amp;gt;&amp;gt;&amp;gt; #&amp;nbsp;&amp;nbsp;&amp;nbsp; with 1 feature ... pnt 1 and 5 are duplicates of course
&amp;gt;&amp;gt;&amp;gt; arr["Shape"]
array([[&amp;nbsp; 340000.,&amp;nbsp; 5022000.],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; 340000.,&amp;nbsp; 5026000.],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; 344000.,&amp;nbsp; 5026000.],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; 344000.,&amp;nbsp; 5022000.],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; 340000.,&amp;nbsp; 5022000.]])
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; SR = arcpy.Describe("in_memory\\AOI_clone").spatialReference
&amp;gt;&amp;gt;&amp;gt; SR.name
'NAD_1983_CSRS_MTM_9'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; centroid = np.mean(arr["Shape"][1:],axis=0)&amp;nbsp; # skip the first point (or last)
&amp;gt;&amp;gt;&amp;gt; centroid.dtype= [('Shape', '&amp;lt;f8', (2,))]
&amp;gt;&amp;gt;&amp;gt; centroid
array([([342000.0, 5024000.0],)],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtype=[('Shape', '&amp;lt;f8', (2,))])
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.env.overwriteOutput = True
&amp;gt;&amp;gt;&amp;gt; output = "f:/Test/AOI_cent"
&amp;gt;&amp;gt;&amp;gt; arcpy.da.NumPyArrayToFeatureClass(centroid, output , ("Shape"), SR)
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in pictoral form&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="134480" alt="in_memory_numpy.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/134480_in_memory_numpy.png" style="width: 620px; height: 273px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614019#M20402</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T02:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614020#M20403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;​, thanks for the KB link, I missed that one.&amp;nbsp; I have to laugh, though, because I don't see the sense in squirreling this information away in a Support KB rather than including it somewhere in the actual documentation associated with ArcGIS Pro, especially since searching the new &lt;A href="http://desktop.arcgis.com/en/"&gt;ArcGIS Desktop &lt;/A&gt;​documentation doesn't search Support KBs like the old &lt;A href="http://resources.arcgis.com/en/home/"&gt;ArcGIS Resources &lt;/A&gt;site for documentation.&amp;nbsp; Measuring progress in backwards steps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 14:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614020#M20403</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-10-30T14:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614021#M20404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Wonderful, clear, and illuminating answer.&lt;/STRONG&gt; Thanks!&amp;nbsp; Barring RAM disk, 'in_memory' work space is my go-to for vector operations.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This answer (and the discussion below&amp;nbsp; about lack of shared stack between threads) gets at the heart of the problem.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Documentation needs to be updated, in my humble opinion.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daryl&amp;nbsp; (with my correct GeoNet login &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 17:38:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614021#M20404</guid>
      <dc:creator>DarylVan_Dyke</dc:creator>
      <dc:date>2015-10-30T17:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'in_memory' workspace in ArcGIS Pro?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614022#M20405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;EM&gt;&amp;gt; Documentation needs to be updated, in my humble opinion. &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;You can get a message directly to the help article author by going to the web help page and selecting the "feedback" link. I do this all the time and they get read. You can even drop a link back to this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2015 06:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/problems-with-in-memory-workspace-in-arcgis-pro/m-p/614022#M20405</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-11-02T06:04:08Z</dc:date>
    </item>
  </channel>
</rss>

