How can I take measurements of the beginning and end of a ruler in UXP? If this is not possible, is there a way to take the curvature tool points?
You mean, taking points of a ruler made by ruler tool?
const {executeAsModal} = require("photoshop").core;
const {batchPlay} = require("photoshop").action;
async function actionCommands() {
const result = await batchPlay(
[
{
_obj: "get",
_target: [
{
_property: "rulerPoints"
},
{
_ref: "document",
_id: app.activeDocument.id
}
],
_options: {
dialogOptions: "dontDisplay"
}
}
],
{}
);
}
async function runModalFunction() {
await executeAsModal(actionCommands, {"commandName": "Action Commands"});
}
await runModalFunction();
1 Like
