ArcGIS Pro 2.6.8, Oracle 18c 10.7.1 EGDB:
I have a ROADS line FC joined to a standalone WARD table. I've selected rows where the ward number is null using Select By Attributes.
I've saved the map as a .mapx map file: https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/save-a-map-file.htm
When I open the map file in a new ArcGIS Pro session, the selection has been preserved.
Question:
How was the selection stored in the map file?
Thanks.
From my understanding, in ArcGIS Pro, selections are not stored in the .APRX or the .MAPX file itself. Instead, they are saved as layer properties within the project. When you reopen the project, the selections are re-applied based on these saved layer properties.
In a related post, JoshuaBixby said this:
...what is exported in the LYRX or MAPX files are binary references to those ObjectIDs and not references to the tools or methods used to select the records.
.LYRX and .MAPX files — Store selection SQL expression in file's JSON source
And Esri Support said this:
Question: where is the selection information stored for .mapx and .lprx files?
- Short answer - The .mapx and .lprx files include a line "CIMPATH=ObjectIdentifierSet/07e7de9080270171f5ce9d789b2ee0e7.dat". This line includes the selection set.
- Long answer - In both .mapx and .lpkz(.lprx) files it leads to the same line: "selectionSetURI" : "CIMPATH=ObjectIdentifierSet/07e7de9080270171f5ce9d789b2ee0e7.dat". It's responsible for storing the selection set. You can see this in the .mapx file by opening it with any editor. The .lpkx file is a bit more complicated. The file is a uncompressed zip file which contains the data in a file geodatabase and two copies of the .lyrx file. One for ArcGIS Pro 2.0 (p20) and the other for ArcGIS Pro 3.0 (p30). It you open the .lyrx file under the p30 directory with an editor you will see the same row. If you delete this line you will not have any selected features. You need to delete the unzipped copy of the .lpkx found under C:\Users\your_user_name\Documents\ArcGIS\Packages to see the update.
Esri Case #03521279 - .LYRX and .MAPX files: Where is selection SQL expression stored?