Hello,
I am trying to create a very simple Python script tool for my team to use when opening a new ArcGIS Pro project that will automatically add a pre-determined group of datasets to the map. Below is a code snippet of what I want to do. Some of the data will be shapefiles and some are feature layers within file geodatabases. (the file path in the actual code is the full directory file path, without the ellipses)
import arcpy
aprx = arcpy.mp.ArcGISProject("CURRENT")
aprxMap = aprx.listMaps()[0]
states_shp = r"...\States_NAD1983\states.shp"
aprxMap.addDataFromPath(states_shp)
aprx.save()
I get this error:
Apologies for my ignorance here, I'm hoping someone can help me out! Thank you! 🙂
-KC
Best,
Katie
“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek