1 Reply Latest reply on Nov 3, 2009 2:07 PM by Yuliaart

    I need to flip, move and duplicate a group in InDesign CS4 JS

    Yuliaart Level 1

      Hi,

       

      I need fo flip, move and duplicate grouped objects in InDesign. So far I have those lines from OMV:

       

       

      var myGroup2 = myGroup.duplicate ([".0625 in", myPageHeight/2]);

       

       

      myGroup.flip (Flip.HORIZONTAL, AnchorPoint.CENTER_ANCHOR);

      or

      myGroup.flipItem (Flip.HORIZONTAL, AnchorPoint.CENTER_ANCHOR);

       


      myGroup.move ([".0625 in", myPageHeight/2]);

       

       

      Those lines work for single object, and what I see in OMV, it should be the same for a group(?), but they don't work.

       

      Your help is highly appreciated.

      Yulia.

        • 1. Re: I need to flip, move and duplicate a group in InDesign CS4 JS
          Yuliaart Level 1

          I got it. The lines are correct, mistake was before the lines - in the group definition. Here what I got and it's working:

           

           

          var myArray = new Array;
          //Add the items to the array.
          myArray.push(myWhiteLine);
          myArray.push(myGreenLine);
          //Group the items.
          var myPage = app.activeDocument.pages [0];
          myLineGroup = myPage.groups.add(myArray);

          var myLineGroup2 = myLineGroup.duplicate ();
          myLineGroup2.flipItem(Flip.VERTICAL, AnchorPoint.TOP_RIGHT_ANCHOR);

           

           

          Thank you.

          Yulia