Is there a way to manipulate the view rotation using the UXP API?

Hi everyone,

I’m working on a project and need to know if it’s possible to control or manipulate the view rotation (e.g., rotating the canvas/view) using the UXP API in Creative Cloud applications. Has anyone successfully implemented this or found relevant methods in the API documentation? Any guidance or examples would be greatly appreciated!

I only can rotate the layer by this code, but what I want to rotate is view, not layer

action.executeBatchPlay({
      _obj: "rotateEventEnum",
      angle: {
        _unit: "angleUnit",
        _value: e
      },
      _target: {
        _ref: "layer",
        _enum: "ordinal",
        _value: "targetEnum"
      }
    })

Thanks in advance!

The function I want to implement is something like the rotating tool.

Can anyone here help me?

image