We wanted our deck to be centered on the door in the side of the adjoining building. I established a level ilne by measuring 1-1/2" down from the underside of the lintel beneath the door (to accomodate the deck boards), setting the level, and tracing a line. We bolted two 12' 2x10s (cut to 141") to the wall, aligning the top of the boards with that level line and one end with the center of the doorway. Adapt these measurements to match whatever building you may be attaching to; if attaching into masonry, use expanding-sleeve masonry bolts (RedHeads) every 12" to secure the 2x10s. If attaching to wood framing, use a pair of 1/2" lag bolts every 16", connecting with studs whenever possible.
At one end of the 2x10s, pound in a 3" nail. Tie a string line to it and stretch it out, roughly square, about 20'. On either side of the string, pound in two 2x4 stakes, about three feet apart. Put the line level on the string line and pull taut against one of the uprights. When the line level bubble is dead in the middle, trace the string's location onto the stake. Screw a piece of 2x4 level across the pair of stakes, with the top of the board aligned with the pencil mark.
The resultant H-shaped arrangement is called a batter board. The top of the cross bar should, theoretically, be level with the top of the 2x10 rim joist attached to the building. Pull the string line tight again, with a helper holding the framing square against the rim joist. Once the string seems square to the building, make a mark on the 2x4 cross bar on the batter board. Put in a screw and tie off the string.
Repeat at the other end of the rim joist. Measure along the strings to make sure they are an even 23'6" apart, all the way along their length. Make a mark on each string at 186" out from the wall. Measure from that mark to the opposite corner, where the other string meets the rim joist. If the strings are square and parallel, those diagonal measurements should match.
Establish the outer string line at the 186" mark, measure diagonals to ensure it is parallel to the wall. Pull two centerlines, shifted 5-1/2" off of perfect center to accomodate the width of the 6x6s. You should now have a grid of strings, all level, with six points of intersection.