Copy link to clipboard
Copied
I know that there is a manual solution to do this via the File => File Info menu. See images below.
The export option saves an XMP file containing all of the file metadata.
On a new file, you can import the saved file and select different options about how to treat existing data and what is contained in the file.
I would like to create a script that performs these actions in a controlled and repeatable way for users.
I am having trouble identifying the relevant UXP objects that would allow me to do this. Has anyone had success with this sort of import and export behavior?
document.metadataPreference.replace() or document.metadataPreference.append().
Copy link to clipboard
Copied
It looks like document.metadataPreference.
Copy link to clipboard
Copied
Thanks!
I was looking at this object independently and saw a save option, but wasn't sure whether this was the same action as exporting via the GUI.
I was able to use the document.metadataPreference.save option to save to an XMP file. I do not see a method on this object for importing, though.
Curious if other folks have found a way to do this.
Copy link to clipboard
Copied
document.metadataPreference.replace() or document.metadataPreference.append().
Copy link to clipboard
Copied
Just found the same thing independently. Thanks for the confirmation!
Copy link to clipboard
Copied
How to register custome namespace and show fileInfo panel ?
I have use metadataPreferences
Copy link to clipboard
Copied
but this code is not working is there any method name mismatch ?
Copy link to clipboard
Copied
but this code is not working is there any method name mismatch ?
By @ashwin_0502
Are you sure you're not running into the very same issue discussed in your initial post here:
That is, that you're still trying to modify an open document using an external library?
(I'm not a UXP expert, so that's just my guess based on my understanding of the answer to your initial question).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now