Indeed, marking intermediate parameters as Managed can cause issues. Below is an example of using the Raster Calculator and then Raster to Polygon. When using in_memory
the model fails; when marking the intermediate outputs as Managed, the in_memory - even though exists in the output path - is ignored and the data is written to %temp%, as the Scratch folder.
According to the in-memory workspace documentation, "Tables, feature classes, and rasters can be written to the in-memory workspace" and therefore it is not clear why it fails. This is not the first time that a 'funny' behavior of in_memory
is reported by users, in this 4-part article the author reports of what seems to be in_memory data written to the disk rather than to the RAM (Python, ArcGIS 10.2.2). I therefore find that using Managed is to 'play it safe' in a way, saves the trouble of testing how each model performs.
With that in mind, I would like to mention two additional aspects to consider. Firstly, if the Model is to be published to ArcGIS Server, administrators may prefer the use of memory over storage and vice versa depending on the available resources and architecture; Secondly, according to the ArcGIS Pro documentation, Managed and Intermediate "The Intermediate and Managed options have been removed in ArcGIS Pro ModelBuilder". I gave it a go and tried both options in ArcGIS Pro 1.0. Surprisingly (or not), the results are exactly the same as running the Model from ArcCatalog.
The above is for 10.3.1 and not 10.1 (the version in question). However, the key relevant documentation has not changed since. I used Win7 and Win 2008 R2.
Making intermediate data managed data - 10.1 | 10.3.1/latest
Using in-memory workspace - 10.1 | 10.3.1/latest
Best Answer
In the first example, you can parse the path and call
%Value%
. In the second example (which may not apply in your case), you can write intermediate files to in_memory workspace--thus, eliminating the need for parsing the path and possibly eliminating the need for the Copy Features tool.