Skip to main content
Inspiring
July 22, 2022
Answered

Guide positioning

  • July 22, 2022
  • 3 replies
  • 772 views

It's easy enough to specify a guide position relative to the top or left edge of an image.  I do it regularly in distance, percent or even pixels.  Is there any simple way to specify the position relative to the bottom or right edge?  I'll want to put this in an action and apply it to images of differing aspect ratios.  Thanks. 

This topic has been closed for replies.
Correct answer c.pfaffenbichler

Please try

View > Guides > New Guide Layout 

3 replies

davescm
Community Expert
Community Expert
July 22, 2022

Another way - drag from the top left of the rulers (where they intersect at the top left of the document window) and you can set the zero point to wherever you want e.g. bottom right. Now you can position guides using the ruler from that mark.

To reset the ruler zero point just double click on that same spot

 

Dave

 

 

GButchAuthor
Inspiring
July 22, 2022

Thank you all.  The "New Guide Layout" worked for what I need.  I had played with that earlier but didn't realize I could save and name a layout.  And then select that layout when recording the action.  Works just the way I wanted.  Every time I post here, someone has an answer that solves my problem.   Thanks again.

Legend
July 22, 2022

Guides can be scripted as well, you can get the document size and calculate where to place a new guide from that.

Stephen Marsh
Community Expert
Community Expert
July 23, 2022

@Lumigraphics wrote:

Guides can be scripted as well, you can get the document size and calculate where to place a new guide from that.




Yes, that was my thought too!

 

I hit a brick wall on the syntax for an arbitrary unit override:

 

#target photoshop
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var rightEdge = activeDocument.height.value;
var bottomEdge = activeDocument.width.value;
activeDocument.guides.add(Direction.HORIZONTAL, rightEdge - 25);
activeDocument.guides.add(Direction.VERTICAL, bottomEdge - 25);
app.preferences.rulerUnits = savedRuler;

 

In the above example, I'm working in the rulerUnits of Units.PIXELS – using a 25px "offset" from the right hand side and bottom edge of the canvas for the guide position. But what if the offset needed to be say 10% of the canvas? The syntax of the override for UnitValue() was tripping me up.

 

c.pfaffenbichler
Community Expert
c.pfaffenbichlerCommunity ExpertCorrect answer
Community Expert
July 22, 2022

Please try

View > Guides > New Guide Layout 

GButchAuthor
Inspiring
July 22, 2022

Followup question.  The "New Guide Layout" solved my basic problem.  I'm happy.  But I'm also curious.  The dialog seems to allow for specifying the color but no matter what color I specify, the guides are black.  Guides dragged out from the edges follow the colors selected in preferences.  I can work around the black guides, but why can't I specify the color since the dialog seems to offer that option?