Hello everybody,
I got a question about updating metadata in ArcGIS pro using a custom script tool (arcpy metadata module).
Specifically, I want to update metadata of my map using a custom script tool, and here is my problem :
1-The metadata of the map is read only when I use the script tool.
In my script, if I launch the following command :
aprx = arcpy.mp.ArcGISProject("CURRENT")
current_map = aprx.listMaps("Map")[0]
map_metadata = current_map.metadata
arcpy.AddMessage (str(map_metadata.isReadOnly))
output : True
It appears that the map metadata is read only.
2-What’s even weirder is that if I launch the same command from the Python window of ArcGIS PRO, the map metadata is not read only :
aprx = arcpy.mp.ArcGISProject("CURRENT")
current_map = aprx.listMaps("Map")[0]
map_metadata = current_map.metadata
print (str(map_metadata.isReadOnly))
output : False
It appears that the map metadata is not read only.
How can I update my metadata using a toolbox ? Ideally, I want to make the map metadata as not read only.
Thanks,