1 Reply Latest reply on Aug 13, 2014 8:50 AM by pixxxel schubser

    Script for adding layer name to artboard as text

    Waterbear

      I've found scripts that are sort of close but not quite this.

       

      I have 1 artboard and many layers (see image). layers.png

       

       

      Does anyone have a script that will take the name of the layer, ie "01_Intro" and create and then place the text "01_Intro" on to the art board in layer 01_Intro? Then it would repeat the process for all the present layers?

       

       

      Thanks in advance!

        • 1. Re: Script for adding layer name to artboard as text
          pixxxel schubser Level 5

          Waterbear,

          something like this?

          // LayersnamesInUpperLeftCorner.jsx
          // https://forums.adobe.com/thread/1546630
          // write layers names in upper left corner of the active artboard
          // required: opened document, no toplevel layers locked, all layers visible
          // regards pixxxelschubser
          var aDoc = app.activeDocument;
          var theLayers = aDoc.layers;
          for (i=0; i<theLayers.length; i++) {
              var txt = theLayers[i].textFrames.add();
              txt.position = [0,0];
              txt.contents = theLayers[i].name;
              }
          
          

           

          Have fun