1 Reply Latest reply on Jul 29, 2013 9:37 AM by Jump_Over

    Need all frames in same size

    BEGINNER_X Level 3

      Hi ALL,

       

      Is it possible to fix all the looping frames in same size.

       

      i.e., Width = 10mm; Height = 8mm;

       

      I am sucess in resize the bounds. But I not able to fix in same size for the finding objects.

       

      Trying Code:

       

       

      var myDoc = app.activeDocument;
      myDoc.viewPreferences.horizontalMeasurementUnits = myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
      
      app.findObjectPreferences = NothingEnum.nothing;
      app.changeObjectPreferences = NothingEnum.nothing;
      
      app.findChangeObjectOptions.objectType = ObjectTypes.ALL_FRAMES_TYPE;
      app.findObjectPreferences.appliedObjectStyles ="aaa";
      
       var myFind = app.activeDocument.findObject();
      //~  alert(myFind.length)
      
       for(i=0; i<myFind.length; i++)
       {
           var myBounds = myFind[i].geometricBounds;
           myBounds[3]-myBounds[1] = "10mm"
           myBounds[2] - myBounds[0] = "8mm"
      
      //~      myBounds[2] = myBounds[2] + 10;
      //~     myBounds[3] = myBounds[3] + 10
      //~      myFind[i].geometricBounds = myBounds
           }
      

       

      Could anyone help for my request.

       

      Thanks in advance

      Beginner

        • 1. Re: Need all frames in same size
          Jump_Over Level 5

          BEGINNER_X wrote:

           

          ...

          for(i=0; i<myFind.length; i++) {      var myBounds = myFind[i].geometricBounds;      myBounds[3]-myBounds[1] = "10mm"      myBounds[2] - myBounds[0] = "8mm" //~      myBounds[2] = myBounds[2] + 10; //~     myBounds[3] = myBounds[3] + 10 //~      myFind[i].geometricBounds = myBounds

          ...      }

           

           

          If someone would ask you to set y - x = 10 will you

          increase/decrease  "y" or

          increase/decrease  "x" or

          both of them?

           

          what InDesign should do?


          myBounds = myFound[i].geometricBounds;
          myBound[2] = myBounds[0] + 8;
          myBound[3] = myBounds[1] + 10;
          myFound[i].geometricBounds = myBounds;
          

           

          this should work inside your loop

           

          Jarek