Hello everyone,
I'm facing an issue regarding the addDataFromPath method.
I have used it successfully when I was working with a notebook inside my project to add some shapefiles to a map. However, now I need to convert the notebook into a python script and it is not working. When I run the script I get no errors at all but the shapefiles won't show up on the selected map.
Here's how my code looks like:
project = <project_path>aprx = arcpy.mp.ArcGISProject(project)map = aprx.listMaps(map_name) [0]shape = os.path.join(out_path, out_name_pto)map.addDataFromPath(shape)
aprx.save()
Thanks!
In the end, I had removed this part entirely from the code, because I needed it ASAP, but I will give it a new try!