ArcPy – Listing Datasets in the In-Memory Workspace in ArcGIS Pro

arcgis-proarcpyin-memorylistworkspace

I have some sensitive data which I would prefer to only exist in memory that I wish to use in ArcGIS Pro. Loading the data into the "memory" workspace is no problem, and so is deleting it, but managing large numbers of layers in memory is problematic.

In ArcGIS Pro, is there any way to list the data available in the "memory" workspace?

Deleting the associated layers does not remove the data

Best Answer

This question was cross posted to List data in "memory" workspace -- Esri Community, and below is my reply over there.

Not all ArcPy functions that work with workspaces, e.g., ListFeatureClasses, work with the new "memory" workspace. ArcPy DA Walk usually does if you know the underlying name of the workspace and not its "memory" alias. Try:

next(arcpy.da.Walk("InMemoryDB\GPProMemoryWorkspace"))

Related Question