As you can see here (https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm). ArcGISProject supposedly has a method 'updateFolderConnections'. However I get the following errror when trying to use it. I have the most recent version of pro.
AttributeError: 'ArcGISProject' object has no attribute 'updateFolderConnections'
Here's my code:
import arcpy, os, sys
from arcpy import env
aprx = arcpy.mp.ArcGISProject(r"[filepath]")
conncetions = [
....
connections = [
{
'connectionString':proj_folder,
'alias':'',
'isHomeFolder': True
},
{
'connectionString': proj_folder + "\\Data",
'alias':'',
'isHomeFolder': False
}
]
aprx.updateFolderConnections(connections)