How to get exact position of a ruler guide in Photoshop?

21

9

There is a horizontal ruler guide set somewhere in the middle of an existing Photoshop CS5 document. How to get its exact position (number of pixels from the top) so I can create another guide 100px away from it?

serg

Posted 2012-08-08T19:03:29.400

Reputation: 1 160

Answers

16

In the menu choose "View > New Guide...", this will ask you for Horizontal or Vertical Orientation of the line you will make. Position being the location of the line on the paper (4th geometrical quadrant)

New Guide

BillyNair

Posted 2012-08-08T19:03:29.400

Reputation: 279

2Bad because it doesn't answer the question, good because it solved the problem I ended up here trying to solve (placing a guide in a particular location). Voted up because I bet most people would be happy to just put the guide where they want it, and the real answer is lame (hover and watch info). – jerclarke – 2015-01-08T21:33:03.123

This answer is how to create a new guideline, not how to get the position of an existing guideline! – Goowik – 2016-10-18T12:36:59.817

1Sorry @Goowik, I was answering the second part of his question, about setting it 100px away once he knows the position he wants, rather than move it by hand and missing by a few pixels. I don't like to edit my answer after it has been read, so I left it as is, sorry if it confuses you. – BillyNair – 2016-10-18T23:53:28.077

1The answers above is less more effective than this one. – onetdev – 2013-05-31T07:40:21.603

The question is how to determine the value to specify as the location of the line. – martineau – 2013-10-18T10:36:10.260

@orosznyet: What answers above and what does less more effective mean? – martineau – 2013-10-18T10:38:00.503

15

I only have the CS4 version. In it the way I would try to determine this would be to use the cursor X & Y position displayed in the INFO tab of the Info window (F8 key). This displays the current location of the mouse cursor measured relative to the active document's top-left corner. With that visible all you need to do is move the mouse cursor so it's on top of the ruler guide and look at the X or Y value displayed. Zooming in on the image can make positioning the cursor precisely easier, so can enabling the Precise option in Cursor Preferences (not shown in screenshot below).

Alternatively, you may be able to read the position off the regular horizontal or vertical ruler that can be made to display (Ctrl-R or Cmd-R) on the edges of an image's window.

Below you can see there's a ruler guide (the light blue vertical line) with the mouse cursor directly on top of it. As you can also see, "950" is what is being displayed for the X coordinate in the INFO pane of the floating window over on the right -- which is exactly the position specified when the guide line was created for use in this example.

screenshot of Photoshop application window

martineau

Posted 2012-08-08T19:03:29.400

Reputation: 3 849

6

Make sure the Info panel is visible, then start moving the old guide (Ctrl or Cmd and drag).

You should see something like this:

Mathematica graphics

  • The ΔX: and ΔY: fields (upper right) will show the offset from the original position.

  • The X: and Y: fields (lower left) will show the absolute position.

Drag back until the offset is zero, which means the guide is in its original position, then read the absolute position off of the corresponding X: or Y: field. If you wish to read the position in pixels you will need to set that measurement section of the Info panel to pixels, which is done by clicking the + symbol at the left side. Once you have read the position you can press Esc to cancel the move, which will make sure that you don't accidentally move the guide by a pixel or two as you release.

By the way you may find use in the GuideGuide plugin.

Mr.Wizard

Posted 2012-08-08T19:03:29.400

Reputation: 1 309

2

This script will get you a list of all guides in the active document:

function getGuides(doc) {
    var i, l;
    var g, d;
    var guides = [[],[]];

    for (i=0,l=doc.guides.length; i<l; i++) {
        g = doc.guides[i];
        d = (g.direction === Direction.HORIZONTAL) ? 0 : 1;
        guides[d].push(parseFloat(g.coordinate)+0);
    }
    return guides;
}

function listGuides(doc) {
    var report = "Guides in " + doc.name;

    var guides = getGuides(doc);
    var directions = ["Horizontal", "Vertical"];
    var units = (doc.guides.length) ?  doc.guides[0].coordinate.toString().split(" ")[1] : "px";

    var i, j, l;
    var d;

    for (d=0; d<2; d++) {
        report += "\n\n" + directions[d] + ":\n";
        if (guides[d].length) {
            guides[d].sort(function(a,b){return a-b;});
            for (i=0,l=guides[d].length; i<l; i++) {
                report += "\n" + (i+1) + ") " + guides[d][i] + " " + units;
            }
        } else {
            report += "\nNone";
        }
    }
    return report;
}


//Dispatch
if (BridgeTalk.appName === "photoshop") {
    alert(listGuides(app.activeDocument));
}

chthonicionic

Posted 2012-08-08T19:03:29.400

Reputation: 21

Very useful! To run this, save it as a .js file then use File > Scripts > Browse... to select the file. – Daniel Lo Nigro – 2017-10-29T05:33:56.607

0

on Adobe Creative Cloud (2017), when you drag and make the ruler guide, don't let go the left mouse button. It will show the current coordination of x-axis or y-axis.

esprithk

Posted 2012-08-08T19:03:29.400

Reputation: 1

1Where the current coordinate will be shown? As a tooltip? Or at bottom where the status bar is? – Vylix – 2017-12-05T06:43:41.483