Artboards bounds in API 2.0

Meanwhile try this:

   const {batchPlay} = require("photoshop").action;

   const result = await batchPlay(
      [
         {
            _obj: "get",
            _target: [
               {
                  _property: "artboard"
               },
               {
                  _ref: "layer",
                  _id: 9 //change this ID
               },
               {
                  _ref: "document",
                  _id: 219 //change this ID
               }
            ],
            _options: {
               dialogOptions: "dontDisplay"
            }
         }
      ],
      {
      }
   );
   
   const pinned = result[0].artboard.artboardRect;

1 Like