3 Replies Latest reply on Dec 22, 2015 8:22 PM by Chinnadk

    Group Objects


      Hi All,


      Is there a way to select group item based on placed image name? I have a document containing numbers of boxes that I need to select and export.

      There are three frames. 1 text frame and 2 graphic frames. Tick mark image name is tick_icon.eps and background image name is green_bg.eps.

      I need to select it through script based on graphic name. Needed help!





        • 1. Re: Group Objects

          try using a Script Label to identify each element that will be sought by the script.

          • 2. Re: Group Objects
            david_p Level 1

            This would be the general approach in AppleScript - get a reference to the link via the file name, then navigate up the link's parental hierarchy to find the group.


            tell application "Adobe InDesign CC 2015"

              tell document 1

              set theLinks to links whose name = "tick_icon.eps"

              set theLink to item 1 of theLinks

              set theParent to parent of theLink --parent should be PDF

              set theGrandparent to parent of theParent --parent should be rectangle

              set theGreatGrandparent to parent of theGrandparent --parent should be group

              if class of theGreatGrandparent is group then

              select theGreatGrandparent

              end if

              end tell

            end tell

            • 3. Re: Group Objects
              Chinnadk Level 4

              try this,


              var doc = app.activeDocument;
              var links = doc.links;
              for(var i=0;i<links.length;i++)
                      if(links[i].name == "test.eps")
                              var grp = links[i].parent.parent.parent;