• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Guide positioning

Explorer ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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. 

TOPICS
Actions and scripting , Windows

Views

227

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 22, 2022 Jul 22, 2022

Please try

View > Guides > New Guide Layout 

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Please try

View > Guides > New Guide Layout 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied


@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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

LATEST

@davescm wrote:

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


 

Adding to this alternative mentioned by Dave, setting the ruler origin point can't be recorded in an action, which limits what can be done with such automation. A script can change and reset the origin point:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/feature-request-set-ruler-origin-loca...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines