SetPropertyX causing Upgrade Metadata requirement

2404
0
05-28-2015 12:09 PM
Adele_MarieMacDonald
New Contributor

Hello,

I have somewhat successfully converted my metadata programs from VBA to VB .Net. These programs create the metadata for a geodatabase that is constantly being rebuilt from scatch.

Unfortunately, when I run my converted programs in 10.3, I always have to "Upgrade my Metadata" once the metadata has been applied. After rebuilding once again, piece by piece, it seems that everything is okay until I use the SetPropertyX command. Once this is run, the 'Upgrade Metadata' box re-appears. Following in blue & red is a piece of my code:

   Protected Sub Update_Metadata(Metadata_Location As String, pGxObject As ESRI.ArcGIS.Catalog.IGxObject)

        Dim pMetadata As ESRI.ArcGIS.Geodatabase.IMetadata

        pMetadata = pGxObject

        Dim pPropertySet As ESRI.ArcGIS.esriSystem.IPropertySet

        pPropertySet = pMetadata.Metadata

        Dim pXmlPropertySet As ESRI.ArcGIS.Geodatabase.IXmlPropertySet2

        pXmlPropertySet = CType(pPropertySet, ESRI.ArcGIS.Geodatabase.IXmlPropertySet2)

        'Testing the update of metadata elements

        pXmlPropertySet.SetPropertyX("idinfo/descript/abstract", "More testing...", ESRI.ArcGIS.Geodatabase.esriXmlPropertyType.esriXPTText,

                                     ESRI.ArcGIS.Geodatabase.esriXmlSetPropertyAction.esriXSPAAddOrReplace, False)

Does anyone know of a way to set the metadata without it tripping the "Upgrade Metadata" box?

Thanks in advance for your help!

0 Kudos
0 Replies