Select to view content in your preferred language

How are selections stored in a .MAPX map file?

556
2
12-06-2023 07:08 AM
Bud
by
Esteemed Contributor

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?

  1. Is the selection a static list of OBJECTIDs?
  2. Or did a dynamic SQL expression from Select By Attributes get saved?  WARD IS NULL
  3. Or something else?

Thanks.

2 Replies
Robert_LeClair
Esri Notable Contributor

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. 

Bud
by
Esteemed Contributor

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?

 

0 Kudos