Does the 'updateFolderConnections' method

351
1
03-23-2023 03:22 PM
rescobar
New Contributor III

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)

 

 

 

0 Kudos
1 Reply
Luke_Pinner
MVP Regular Contributor

You don't say what version of Pro you are using.  Are you sure you're using 3.1? It was only released last month. The updateFolderConnections method is new in 3.1 and isn't available in 3.0.x or earlier