March 19, 2006

ASK MORDY: Duplicating and Distributing Objects

Jennie, who uses Illustrator 9, asked the following question:

I am trying to find out how to align say 100 1" squares, in an Illustrator document that has a size of 20"x20" with rows of 10 squares across and 10 squares down. I need to be able to try, first a space of 1" between the squares and later 1/2" between the squares to see which I prefer.

I managed to do it manually, first drawing a 1" square and copying and pasting it in a row then aligning the row with the align tool...then copying the whole row and pasting it beneath, this is a lot of trouble and I think there must be an easier way.

There's always an easier way, isn't there?

In reality, I've always marveled at how Illustrator -- and all Adobe products for that matter -- never has just one way to accomplish a task. People always ask me how to do something, and the first thing I'll usually say is, "well, tell me what it is that you are trying to do". In this way, I can tell them the best way to accomplish the task. In truth, this approach also make Adobe products that much more difficult to learn because there are all of these tools or functions, each used for a different specific situation or need.

But I digress. Let's get to the answer to Jennie's question.

One way to do this would be to create a blend where you specify the number of steps. But I want to present another way which also shows off one of the most powerful features in Illustrator -- Live Effects.

Step 1: To start, create your 1" square. Select the Rectangle tool, click ONCE on the artboard and enter Width and Height values of 1". Click OK to create the square.

Step 2: With the square still selected, choose Effect > Distort & Transform > Transform. Most people don't think of applying a transform as an effect, but in my book I speak of several reasons about why this is so beneficial. In the Transform Effect dialog box, enter a value of 9 for the number of copies (your original square, plus the 9 copies will make 10). Then enter a value of 2" in the Move Horizontal field. This will move your one inch square so that exactly one inch will appear between it and the original. Check the Preview button if you want to double check the results before you apply them. Then click OK to apply the effect..

Step 3: With the square still selected, choose Effect > Distort & Transform > Transform. Illustrator will throw up a dialog telling you that "hey, you already applied that effect!" and to which you reply "I know what I'm doing" and you click the Apply New Effect button. This time, again enter a value of 9 for the number of copies, but set the Move Horizontal value to 0 and set the Move Vertical setting to 2". Click ok to apply the effect.

So let's review what we've done. We've drawn a single shape, but used two Transform effects to create the duplicates that we needed. Now it comes time to adjust the amount of space between each shape...

Step 4: With the square selected, take a look at your Appearance palette. You'll see the two Transform effects listed there. Double click on one of them and change the 2" value to 1.5" -- which will result in a .5" space between each shape. Do the same for the other Transform effect. Basically, to change the size of the square, do that by adjust the size of the original square that you created. To adjust the amount of space between each square, change the amount in the Transform effects.

If you need to access the individual squares, select the original square and choose Object > Expand Appearance.

1 comment:

Scott Southerland said...

I like it, thanks for the tip Mordy