9 Replies Latest reply on Aug 7, 2015 5:35 AM by Evgeny_Trefilov

    Adobe InDesign CS6 (8.0) Asset.placeAsset(document) getting undefined

    juan miguela24038520

      UPDATE:


      I commented out the addpage line and the script ran without any issues. So the error seems to come about when adding a page and then adding the library asset to it. So the question seems to lie in , "how to add a library asset on a new page?" The code below seemed to work with CS2.


      Screen Shot 2015-04-01 at 2.03.04 PM.png


      Hi - We wrote .jsx scripts for the CS2 version of InDesign. We now have InDesign CS6. When we run the scripts we get the following error:


      Screen Shot 2015-04-01 at 1.27.19 PM.png

      The basic function of the script is to import an xml file, select a library, get a specific asset from the library and then adds it to the document.

       

      This is the section of code in the .jsx file that is generating the error; line 204 is generating the error

       

      Screen Shot 2015-04-01 at 10.54.35 AM.png

       

      I've checked both theTemplate and myDocument objects at the time of execution and they are both valid objects.


      Screen Shot 2015-04-01 at 11.39.23 AM.png


      I have no idea why it would throw an undefined is not an object error message? I've scoured the internet and I am unable to find anything related to this matter and the guy who wrote the scripts has left the the company. Any help in the right direction is greatly appreciated.


      Also, this question was already asked in the Indesign forum, and they suggested I should ask this question here after no solution was found.


      Adobe InDesign CS6 (8.0) Asset.placeAsset(document) getting undefined