UXP Photoshop unexpected values of artboard bounds

I’m testing on Photoshop 26.3.0 while working on a plugin with UXP.

I was expecting the bounds property of an artboard to reflect the values displayed in the properties panel, when that artboard is selected. So W, H, X, Y => width, height, left, top.

I think it is supposed to be that, but at the moment I’m getting everyting with a value of 0. And the object appears to have change its structure…

{
_top: 0, 
_bottom: 0, 
_left: 0, 
_right: 0
}

So it not only not reflecting the actual values for each property but some properties are missing… width and height are not there anymore. Also the object seems to be different than in the docs.

To reproduce this you can use the UDT playground and write require("photoshop").app.activeDocument.artboards[1].bounds in the console. While in a document with an arboard. You can move the arboard around and it will always have all values set to 0…

I guess I’m either doing something wrong myself and asking if this is the intended way to get properties like position and size of artboards… Or its bugged. I think its bugged.

I tested this code using those artboards.

app.activeDocument.artboards.forEach(board => console.log(board));

  • artboard01 has a default layer
  • artboard02 has a solid color layer
  • artboard03 has an empty layer
  • artboard04 doesn’t have any layer

As a result, while artboard01 and artboard02 return bounds correctly, artboard03 returns 0 point values as you mentioned.
And artboard04 returns invalid values such as undefined or NAN.