Hello,
I see this command: 'updateFolderConnections' in the ArcGISProject documentation (https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm) but I don't see any examples of how to use the tool. Does anyone have any example code that uses this command?
I don't really understand the entry, what would the dictionaries contain exactly?
updateFolderConnections (folder_connections, {validate}) | Replaces project folder connections using a list of dictionaries that describe each connection. |
The expanded method help makes this clearer. You pass in a list that contains dictionaries, one dictionary per folder connection. Each dictionary has three keys and associated values: "connectionString" (A local or UNC path to a system folder), "alias" (optional alias for the path in the catalog view) and "isHomeFolder" (True if this entry is for the home folder, False otherwise). Basically you're passing in an anonymous config object like it's a JavaScript function, even though Python supports named objects. Guess whoever wrote that interface had a long day and didn't want to define a proper object 😁.
Thank you for breaking this down!
Do you know if there's a similar command for database connections?
Sorry, to spam you but I'm getting this error:
AttributeError: 'ArcGISProject' object has no attribute 'updateFolderConnections'
from this code:
aprx.updateFolderConnections (connections)