In addition to the values that are added automatically by ArcCatalog, some documentation must be provided for your metadata to be compliant with the Federal Geographic Data Committee's (FGDC) Content Standard for Digital Geospatial Metadata. When metadata is created, the FGDC Synchronizer provided with ArcCatalog adds hints indicating which mandatory elements are missing and what information they should contain. This tip demonstrates how to add those hints to an existing metadata record.
This macro doesn't verify that the selected object supports metadata, whether it already has metadata, or whether the metadata is writable.
How to use
- Paste this macro into VBA.
- Select an object in ArcCatalog that has metadata.
- Run the macro.
Sub AddFGDCHints()
Dim pGxApp As IGxApplication
Dim pGxView As IGxView
Dim pMD As IMetadata
Dim pPS As IPropertySet
Set pGxApp = Application
Set pMD = pGxApp.SelectedObject
Set pPS = pMD.Metadata
' documentation hints are added to the metadata when the
' value of the SyncOnce element is True
pPS.SetProperty "Esri/SyncOnce", "TRUE"
' save the changes to the metadata
pMD.Metadata = pPS
' have ArcCatalog update the metadata - afterwards the
' value of the SyncOnce element is False, and the
' ModDate and ModTime elements will be updated
pMD.Synchronize esriMSAAccessed, 0
Set pGxView = pGxApp.View
If TypeOf pGxView Is IGxDocumentationView Then
pGxView.Refresh
End If
End Sub