# Measure points of ruler tool

**URL:** <https://forums.creativeclouddeveloper.com/t/measure-points-of-ruler-tool/11575>\
**Category:** UXP Plugin API\
**Created:** [November 30, 2025, 1:24am UTC](https://forums.creativeclouddeveloper.com/t/measure-points-of-ruler-tool/11575 "2025-11-30T01:24:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hazov](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hazov](https://forums.creativeclouddeveloper.com/u/Hazov)\
**Post date:** [November 30, 2025, 1:24am UTC](https://forums.creativeclouddeveloper.com/t/measure-points-of-ruler-tool/11575/1 "2025-11-30T01:24:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![shuji](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/shuji/32/4905_2.png) [@shuji](https://forums.creativeclouddeveloper.com/u/shuji)\
**Post date:** [November 30, 2025, 9:04am UTC](https://forums.creativeclouddeveloper.com/t/measure-points-of-ruler-tool/11575/2 "2025-11-30T09:04:44Z")

</div>

You mean, taking points of a ruler made by ruler tool?

```auto
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();

```

---

<div class="post-metadata">

**Author:** ![Hazov](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Hazov](https://forums.creativeclouddeveloper.com/u/Hazov)\
**Post date:** [November 30, 2025, 12:12pm UTC](https://forums.creativeclouddeveloper.com/t/measure-points-of-ruler-tool/11575/3 "2025-11-30T12:12:27Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/7/74029911b2748d6e5cb93dd35d9e5ec2f843a5eb.png)Thank you very much, it helped. For some reason, it returned three points from the ruler, two of which are the same. But this is not a problem, I will just add what the method returns for other readers.
