We do that for you! Turn on "Log pen vectors" about halfway down the Settings menu. Then grab a PEN TRAILS block from the Pen menu into the scripting area, right-click it, and choose the second option, "pen vectors." When run, this block will report an SVG costume of everything you've drawn since the last CLEAR.