ArcGIS Pro 2.6 and Python 3.6
I am creating a custom Map Series and have hit a bit of a roadblock. I originally was writing all data to a local FGDB, but I'm looking for ways to improve performance.
I switched to using `memory` as this appeared to be a viable option. However, I cannot update the source of the layers inside the map document (.aprx). I have been able to do this successfully with local files (not using the Python CIM), but I am stumped trying to do it with memory objects. Is it even possible?
Here is the layer as it currently exists in my map:
And here is what I'm trying (though I have tried a few things with no luck).
lyrCIM = l.getDefinition("V2")
dc = lyrCIM.featureTable.dataConnection
dc.workspaceFactory = "InMemoryDB"
dc.datasetType = "esriDTAny"
dc.workspaceConnectionString = r"memory//" + l.name
Edit:
Well, maybe it is working?
Considerations when using the in_memory workspace—ArcGIS Pro | Documentation
The in_memory workspace does not support geodatabase elements such as subtypes, domains, representations, topologies, geometric networks, network datasets, or feature datasets.
I am trying to use the newer `memory` workspace. Seems it has the same limitation and I missed it.
https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace....
This was what caught my eye:
To display memory-based data in an ArcGIS Pro map, you can use the memory workspace.