If you need an effect that keeps track of the X and Y position of the paintbrush at all times, Write-On is the only effect that does this. This is great for expressions.
Animate a painting with Write-On, add the beam effect to a layer above.
Set the beam layer to high quality and set the beam length to 100 percent.
Place the beam's end point below the bottom of the comp (centered horizontally).
Add an expression to the beam's start point and Pickwhip Write-On's brush position. It will appear as if the beam is painting the Write-On stroke!