Skip to main content
Participating Frequently
May 2, 2017
Answered

MetaData DIY Plugin: Add another field

  • May 2, 2017
  • 2 replies
  • 2793 views

Hi there,

The MetaData DIY Script that many mention on this forum has been very useful for me. I use it to add MetaData to images that are then read by the Live Caption function in Indesign to create automatic product image descriptions in our catalogues. It's saving a lot of time!

This season, I need to add data into the State/Province field, which isn't currently included in the check box list in the DIY MetaData window. I took a scripting course recently for another reason, so I took the liberty to try myself to add this field in. I can get it as far as showing up in the list and sorting list, but have had no luck getting the data to actually apply to the image. I'm sure it's a beginners mistake!

I would be forever grateful to anyone who could offer me some help in sorting this out. I have included my modified script here for reference.

Dropbox - DIY MetaData

Thanks in advance,

Åsa

This topic has been closed for replies.
Correct answer Stephen Marsh

Cross posted and correctly answered here:

 

Can you import metadata from an excel database to images (JPG, PSD, TIF) in bulk?

2 replies

Participating Frequently
June 18, 2018

I am trying to do very similar thing. I need to add IPTC Subject Code. I added it in the script and have tick box but it comes up with error when I process..

I'm not very familiar with coding .. I'm guessing something is wrong in this part;

if(doIPTC){

         try{

        myXmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "IPTCSubjectCode");

       myXmp.appendArrayItem(XMPConst.NS_PHOTOSHOP, "IPTCSubjectCode", IPTC);

          }catch(e){sendError(errorLog,decodeURI(fileName)+ " :: Bad IPTC Subject Code : "+IPTC);}

            }

Can someone please help me on this?

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
June 18, 2018
SuperMerlin
Inspiring
May 2, 2017
Participating Frequently
May 2, 2017

That works perfectly. Thank you very much!