I'm using ArcPy to get the current aprx, active map, then to create an empty metadata object, and populate it with values from a fGDB table, but I cant copy and save it back to the read only map metadata object.
I'm using the metadata object as documented at Metadata in the ArcGIS Pro Online Help.
m = aprx.activeMap
m.name = Title #set the map elements name to the same as the title
# create empty metadata object and populate it with our varibles
new_md = md.Metadata()
new_md.title = 'Title'
new_md.tags = 'Tag1, Tag2'
new_md.summary = 'Summary'
new_md.description = 'Description'
new_md.credits = 'My Credits'
activemap_metadata = md.Metadata(m) #the metadata object for the active map
if activemap_metadata.isReadOnly:
arcpy.AddMessage("the metadata object for the active map is read only")
else:
activemap_metadata.copy(new_md)
activemap_metadata.save()
I'm open to ideas