Using resolve() to get coordinates / position
I'm trying the get positions of a line, and since geometricBounds / visibleBounds just give me the frame position I thought I could get it through "resolve()". But I'm apparently missing something; every example I find for resolve() uses AnchorPoint and CoordinateSpaces, but I'm not sure how to reference them
Example:
const id = require("indesign");
const app = id.app;
// We only have one item (line) in the document
const line = app.activeDocument.pageItems.item(0);
// Use resolve method, where all examples look like this:
const position = line.resolve(AnchorPoint.TOP_LEFT_ANCHOR, CoordinateSpaces.SPREAD_COORDINATES)[0];
console.log(position);Which gives
ReferenceError: AnchorPoint is not definedHow do I set up my code so that it gets the correct "AnchorPoint.TOP_LEFT_ANCHOR" and "CoordinateSpaces.SPREAD_COORDINATES" ?
