5 Replies Latest reply on Oct 31, 2012 1:06 AM by Jump_Over

    Using Library Items

    hurix@123 Level 1



      Can anybody help me on the following  scripts.


      I have a Indesign library which contain Box Frame. This a text frames.

      What I want is, pull the element from the library and place some text in the textframe and place that element in the indesign  pages either top or bottom.


      I am able to  pull the element from the library. But unable to place the text into the textframes and place top or bottom.


      Can anybody help me on this.


      My coding is below.



      var graphicLibrary = new File("/Users/Hurix/Desktop/Books/Library.indl");
      if (graphicLibrary.exists) {
          app.open(File("/Users/Hurix/Desktop/Books/Library.indl") );   
      else {   
          alert("Creating new Library");
          var graphicLibrary = app.libraries.add(File("/Users/Hurix/Desktop/Books/Library.indl"));


      var getGraphics = getGraphicsFunc(graphicLibrary);


      function getGraphicsFunc(graphicLibrary)
          var t = app.libraries.item(0);
          libList = t.assets.everyItem().name;
          for (var i=0; i<libList.length; i++)
              myAsset = t.assets.item(i);
              var libItem = myAsset.placeAsset(app.documents[0]);


      My XML Code:









      Message was edited by: hurix@123