1 Reply Latest reply on May 26, 2015 9:24 PM by Ten A

    Select Parent Text Frames

    BEGINNER_X Level 3

      Hi,

       

      Is it possible in illustrator to select the parent text frames?

       

      i.e.,

      app.activeDocument.selection.parent.selected = true;
      

       

      Input:

      Screen Shot 2015-05-27 at 7.00.32 AM.png

      Output:

      Screen Shot 2015-05-27 at 7.00.37 AM.png

       

      In Indesign, we use the below code:

      app.select(app.selection[0].parentTextFrames[0])
      

       

       

      Thanks

      Siraj

        • 1. Re: Select Parent Text Frames
          Ten A Adobe Community Professional

          Here is a sample function I made:

           

          function getTXF (){

            var tg = app.selection;

            app.executeMenuCommand("deselectall");

            var n=0;

            for (var i=0;i<tg.parent.textFrames.length;i++){

            n += tg.parent.textFrames[i].characters.length;

            if (n>tg.characterOffset) break;

            }

            tg.parent.textFrames[i].selected = true;

            }

           

          Ten