AnsweredAssumed Answered

Importing metadata to a layer file

Question asked by granth on Jun 26, 2015
Latest reply on Aug 1, 2018 by granth

I have a script which creates a layer file for every layer in an MXD, and I would like to copy the metadata (especially description and tags) from the source into the layer file.


However it seems that importing metadata into a layer file using arcpy fails and nothing is visible in ArcCatalog. Even attempting to import it in ArcCatalog seems to fail, along with the metadata importing tools (Import Metadata and Metadata Importer) in the toolbox. However, if I export the layer file metadata to an XML file, I can clearly see under <dataIdInfo><idPurp> and <idAbs> etc the text that I want. For some reason this is not visible in ArcCatalog though.


I can get it to update if I edit the metadata first in Catalog (putting some text in the summary for example and saving it), and then use the Metadata Importer. This doesn't seem feasible in code, as the only way to modify the metadata is to export it, modify it and import it again, and that last step fails!


Anybody successfully managed this?


ArcCatalog 10.3, Win 7