Synchronize Metadata (Conversion)
Summary
Automatically updates an ArcGIS item's metadata with the current properties of the item.
For example, if the metadata describes the item as having one projection but the item's projection has changed since the last automatic update, the old projection information in the metadata will be replaced with the new projection information.
The item's metadata must be stored in the ArcGIS metadata format; otherwise, the metadata will not be synchronized.
If a property was set using ArcGIS Desktop 9.3.1 or earlier to prevent ArcGIS from automatically updating this specific item's metadata with the item's properties, it will be ignored in the current release. ArcGIS metadata will always be synchronized with the item it descibes.
Usage
By default, metadata is automatically updated when anyone who has write access to the ArcGIS item views its metadata. Metadata can also be synchronized by running this tool. The option to turn off synchronization when you view metadata doesn't affect how this tool operates.
-
If someone edits an ArcGIS item's data or changes its properties and does not view the metadata, the properties recorded in the metadata are out of date with the actual properties of the item. If you were to use or publish the item's metadata in this state without first running this tool the information in the metadata would not be current.
The Export Metadata, Export Metadata Multiple, Validate Metadata, and Validate Metadata Multiple tools all update the metadata automatically before performing other operations. The Import Metadata and Upgrade Metadata tools automatically update the metadata after performing other operations.
If your organization's metadata workflow incorporates other operations or tools that don't synchronize the metadata you may want to write a Python script that would run this tool as needed. For example, if you use a utility that publishes metadata for all items in a geodatabase to a metadata catalog nightly, ideally you would synchronize the metadata content nightly before publishing to ensure the published information is always current.
XML files do not support metadata synchronization. If you try to synchronize a stand-alone metadata XML file, the tool will complete successfully but the XML file will remain unchanged.
-
The Source Metadata parameter has a complex data type. If you use this tool in a model, create a variable for the Source Metadata parameter in ModelBuilder by right-clicking the tool and choosing Make Variable > From Parameter > Source Metadata.
-
When using this tool in ModelBuilder, the Output Metadata parameter is derived from the Source Metadata parameter.
-
If you do not have write access to the ArcGIS item or its metadata or the stand-alone metadata XML file that you are trying to modify, this tool will complete successfully, but the item's original metadata will remain unchanged.
Syntax
Parameter | Explanation | Data Type |
source |
The item whose metadata will be synchronized. | Data Element; Layer |
synctype |
The type of synchronization that will take place.
| String |
Code Sample
Metadata for an ArcGIS item is updated to contain the current properties of the item only if the item already has metadata; new metadata won't be created.
import arcpy
from arcpy import env
env.workspace = "C:/data/data.gdb"
arcpy.SynchronizeMetadata_conversion("vegetation", "NOT_CREATED")