Select to view content in your preferred language

Store relative path names in existing MXD (ArcGIS 10.4)

2134
4
10-24-2017 01:26 PM
JacobGardner
Deactivated User

Greetings, I have a question that really has two parts:

1) Attached is an image of a map properties dialog from one of our mapfiles. This mxd was created in ArcGIS 10.4. As you can see, the option of store relative path names is greyed-out: I can't check or un-check it. This seems to be the case with all of our mxd's. Is there a way this option can be made available?

and secondly,

2) We have probably hundreds of mxd's in our files. Some of them were saved with relative paths when they were made, but many were not. Is it even possible to create a script that can set all mxd's in a directory to save relative paths? Obviously this is only relevant if the first part can be resolved.

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

But first.. if you open one of those files, does all the data load perfectly without those red exclamation marks?

See common scenarios in Updating and fixing data sources using arcpy.mapping (no toggle on relative paths that I can see in arcpy)

0 Kudos
JacobGardner
Deactivated User

No, sadly. Due to circumstances out of my control, our shared drive for GIS data has to be mapped to a different network location (Used to be G:, now has to be moved because Google File Stream sets itself to G:) This re-mapping of the network drive has broken the data connections.

0 Kudos
DanPatterson_Retired
MVP Emeritus
0 Kudos
NinaRihn
Frequent Contributor

Sounds like it is not allowing you to check store relative paths because it doesn't have valid paths.... I would try using ArcCatalog's "Set Data Sources" tool (right click on the MXD in ArcCatalog), then replacing all of the wrong drive letters with the right one (ideally using the UNC path instead though to avoid this in the future)....saving it as a new MXD, then try setting it to relative paths.

The other possibility is that, if the data is not either within or below the MXD's directory structure, the relative path thing doesn't work, so if NONE of the data is in or below it, that would be grayed out maybe.

0 Kudos