1 Reply Latest reply on Sep 23, 2015 9:54 AM by pixxxel schubser

    get current artboard size

    SS2 Level 1

      With VBA

       

      MsgBox (vv_docactive.Artboards(1).ArtboardRect(2))

       

      doesn't work

        • 1. Re: get current artboard size
          pixxxel schubser Level 5

          Hi SS2,

          sorry, I'm not familiar with VBA.

           

          But here is an equivalent in Javascript:

          var ab = app.activeDocument.artboards[0];
          var Bds = ab.artboardRect;// left, top, right, bottom
          
          var abLeft = Bds[0];
          var abTop = Bds[1];
          var abRight = Bds[2];
          var abBottom = Bds[3];
          var abWidth = abRight - abLeft;
          var abHeight = abTop- abBottom;
          alert(abWidth.toFixed (3) + " pt × " + abHeight.toFixed (3) + " pt");
          
          

           

          Have fun

           

          1 person found this helpful