Select to view content in your preferred language

New projects: Change folder connections based on project location

462
5
02-09-2026 08:19 AM
Status: Implemented
Labels (1)
AlfredBaldenweck
MVP Frequent Contributor

I serve 2-4 offices but am primarily based in one.

Each office has a separate folder where their data and projects live.

I have a series of favorited folders set to be added to all new projects. This works great for my day to day, but when I have to do work in a different office's folders, suddenly there are a bunch of folder connections that are irrelevant or inappropriate in the new project.

What I'd like to do is set up "profiles" based on a project location, with a closest match to pick the best set of folders.

So

  • Office 1 (\\...Office1\projects\...)
    • Office1
    • Office1\_layerfiles
    • ParentOffice
  • Office 1 specialized resource (\\...Office1\projects\SpecResource)
    • Office1
    • Office1\_layerfiles
    • ParentOffice
    • ParentOffice\SpecializedResource
  • Office 2 (\\...Office2\projects\...)
    • Office2
    • Office2\_layerfiles
    • ParentOffice
  • Other
    • ParentOffice
    • GrandparentOffice

This would be super helpful for me and for anyone else who has to open one of my projects.

5 Comments
cmathers

Could you create a project template for each location and use that when starting new projects?  It wouldn't help with existing projects but it would help with any new ones.

https://pro.arcgis.com/en/pro-app/latest/help/projects/create-your-own-project-template.htm

AlfredBaldenweck

I have been avoiding project templates because of their tendency to copy a bunch of data that I didn't want copied. Granted, the last time I did that was in 2.9, but it burned me pretty hard. I'll do some more experimenting.

cmathers

arcpy.mp.ArcGISProject has two methods, updateDatabases and updateFolderConnections, that take lists and replace all the connections in the project object if you want to write a script to do it in python. Could make a toolbox with a script tool that lets you pick the office from a drop down and updates the project connections based on that. If you favorite the toolbox it would be in all new projects for ease of use. Pro doesn't let you add buttons that run python scripts like Map did but if you know C# the Pro SDK should let you add a button to a toolbar that swaps connection items out in a project. I don't know that language so I'm just giving my best guess from the SDK docs.

ValeriaChavez
Status changed to: In Product Plan
 
AletaVienneau
Status changed to: Implemented

Hello @AlfredBaldenweck

With ArcGIS Pro 3.7 you can export your My Favorites collection to one or more separate files. You can edit their contents so each file has a different set of items. You can then direct ArcGIS Pro to show the items stored in a specific favorites file in My Favorites. In your situation, you can edit the contents of each favorites file to represent the folder connections needed for projects associated with a specific office. The favorites file for a specific office can be stored in the folder where that office's projects and data are stored, for example.

If you configure Pro to use the favorites file for Office 1, the next project you create will have all the folder connections needed for Office 1 that were designated to be added to all new projects. Similarly, if you change Pro to use the favorites file for Office 2, the next project you create will include all the folders needed for an Office 2 project, and so on. 

For more information see the "Export favorites" section and the "Customize the location of the favorites file" section in the Use project favorites help topic.