Creating Dashed Lines in Photoshop

1. First, create a new channel.

New Alpha Channel

2. Next, draw some shapes or whatever you want inside the new "Alpha 1" channel. Use Edit>Stroke to make outlines of everything.

Alpha Channel Shapes

3. Now create a 45 degree line pattern. Personally, I made a new 8x8 pixel document and used the pencil tool to draw in each pixel like the pic below (Note: it's zoomed in 500%). Then you just Select>All and Edit>Define Pattern to create a new pattern. For the lazy people, you can download the patterns I made for Photoshop 7.0 right here: 45diagpatterns.zip. If you downoad my patterns, unzip it to photoshop's Presets\Patterns folder and then in photoshop go to Edit>Preset Manager and load the file.

Diagonal Pattern (zoomed 500%)

4. Back to the original image, Control-Click the "Alpha 1" channel to load it as a selection, or you can go to Select>Load Selection and choose "Alpha 1" (ctrl-alt-4 will work too). Switch back to the RGB channel (or ctrl-~) to get back to "normal" mode. Chose the Paint Bucket (Paint Bucket) tool, switch to pattern mode, chose your 45 degree line pattern from the list, and fill the selection with it.

Paint Bucket Options

5. That's all there is to it. BTW, this is the same method Photoshop uses to display selections, except that it scrolls the pattern to animate it.

Final Image