1 Reply Latest reply on Aug 10, 2009 10:59 PM by John.Kordas

    JS CS3 resize a group

    John.Kordas Level 1

      Is it possible to resize a group?


      I'm putting this script together that will allow a user to make a selection the script copies the selection and creates a new document to a set size. The selections them pasted into the doc and grouped. The example below the new doc is 80x80mm and when ID places the copy on the page the position is wrong position. I would like to be able to change the x and y to 0 and set the height and width of the group to 80mm.


      Is this possible?



      var myDocument = app.documents.add();
          pageHeight = "80mm";
          pageWidth = "80mm";
      myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;
      myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
      myDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;


      var myNewGroup = new Array;

      for (i=0; i<app.selection.length; i++) {
          myNewGroup.push (app.selection[i]);
        var myGroup = app.activeDocument.groups.add(myNewGroup);