On a comp-sized solid, apply as many instances of the Beam effect as you want. Turn off all instances of the effect except for the top one.
Option-click (Mac) on the Beam's start point to make an expression, and pick-whip to one box's position property.
Option-click on the end point, and pick-whip to another box.
Repeat as necessary.
I haven't played with Beam for a while. I think there's a "Paint on transparent/Paint on original" switch, and you'll need to play with that to get the other instances of the effect to show up. But you casnlook that up in AE Help.
But wait, there's more!
Copy the Box layers, and paste them into a new comp.
Make box-sized solids, position them to cover the boxes and parent them to the boxes.
Turn off the box layers so only the solids are visible.
Nest this comp in the main comp, and use the nested comp as a tack matte for the beam layer.
The lines formed by the beams now appear to follow the boxes' anchor points, and they disappear when they get to the box edges.
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA