I am new to shape layers in CS6, and am running up against this issue:
How do I create a stroked line path (with no fill) with precise dimensions?
All I'd like to do is create several horizontal rules exactly 306 pixels wide.
One of the great factors of Photoshop CS6 is true vector elements. This means they can be altered after they are drawn to a greater degree than was ever possible in previous versions.
Note: You can return to the shape layer at any point later and change the "w" field again if you want to adjust the length or height of the line again. This is a HUGE step forward for Photoshop.
I'd recommend using the rectangle tool. If you select the rectangle tool and click on the canvas, you can enter the exact dimensions you're after. In your case, that's 306×1.
Then, use the move tool (V) to drag the layer into place. Pressing command-J will duplicate the layer, and then the new layer can be moved again (you can also use Layer
→ New
→ New Layer via Copy
. Once you've added all the lines, select all the layers and press command-E to merge all the shapes onto one layer (if that's what you want).
Recap:
From there you'll have a single layer with all the lines that you can style using stroke, fill and layer effects.
Why use a rectangle instead of a line?
Photoshop (CS5 and CS6) draws a rectangle when you use the line tool, so they're essentially the same thing. There is one difference though — the rectangle tool in Photoshop CS6 can be created to a specific size by clicking on the canvas, where the line tool can't.
You can also make rectangular selections using the Marquee tool and select "Fixed Size" from the pull down. Be sure Feathering is turned off, so that the result will be solid/non-gray scale pixels (assuming that's what you want).