Geographic Information Systems Asked by Cody Brown on December 24, 2020
I’m looking for a similar functionality as this tool: Import Metadata in ArcGIS Pro. I am upgrading some of our older scripts and I can’t seem to find a similar tool or even one that could do something somewhat similar.
Does ArcGIS Pro have any ArcPy options for this at 2.6 (which I am currently using)?
It is discussed in the documentation here: https://pro.arcgis.com/en/pro-app/arcpy/metadata/migrating-from-arcmap-to-arcgis-pro.htm
I just use a simple wrapper:
import arcpy
from arcpy import metadata as md
def pro_import_metadata(source_metadata:str, import_type:str, target_metadata:str, enable_automatic_updates:bool):
target_item_md = md.Metadata(target_metadata)
target_item_md.importMetadata(source_metadata,import_type)
if enable_automatic_updates:
target_item_md.metadata_sync_option = 'ALWAYS'
target_item_md.reload()
target_item_md.save()
Do note that the Import_Type strings has changed from Desktop.
Correct answer by Mark Bryant on December 24, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP