I was looking into how to access the values stored within a document’s guides, and I was led to this:
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/guides/
I checked the console, and investigated the open document via app.activeDocument
. The console returned a document object with the properties and methods I’d expect. However, the “guides” property is entirely missing. This document has multiple guides already on it. How do I access these values?
Please check whether you’re using API v2 in the manifest—some of the newest PS API require v2.
See the documentation here.
Thanks! I am not sure why I didn’t consider how simple it was to update the API Version in the manifest.json
Now, I’m able to access the guides via something like
app.activeDocument.guides.forEach((guide) => {
console.log(`${guide.coordinate}, ${guide.direction}`);
})
That’s why I’ve been constantly asking to add min manifest and API versions to the docs for each property/method/feature if it was not supported from the beginning
1 Like