IMetadataHelper implementation in ArcCatalog

347
1
06-29-2014 11:53 AM
SuleymanArslan1
New Contributor
I want to implement IMetadataHelper interface in ArcCatalog, but i could not find a way to implement it.
API Reference mention that it should be implemented through MetadataExtension but i coud not implement MetadataExtension also.
http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0015000000w3000000

Is there anybody to help me to solve this issue.

Thanks,

Suleyman.
0 Kudos
1 Reply
AhmedEl-Sisi
Occasional Contributor III
Hi Suleyman,

You can get MetadataExtension by Its CLSID or name.

 
        private IMetadataHelper GetMetadataExtension()
        {
            try
            {
                UID metaDataID = new UIDClass();
                //the ProgID
                metaDataID.Value = "esriCatalogUI.MetadataExtension";
                //or the CLSID
                //metaDataID.Value = "{055B2B99-F2C9-11D2-9FC1-00C04F8ED211}"; //ESRI Metadata Extension
                IExtension metadataExtension = ArcMap.Application.FindExtensionByCLSID(metaDataID);
                return  metadataExtension as IMetadataHelper;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return null;
            }
        }
0 Kudos