I don't see any way to get your code to work directly. Not that there's anything wrong with your code, but rather a limitation in the way lisp works.
Each drawing has it's own lisp environment. That's why you can't access a lisp variable from one drawing in another drawing. I suspect your code stops as soon as it activates the second drawing. This is because the active drawing hasn't had any commands issued (or lisp routines run) and your lisp routine can't run in the first drawing because that drawing is no longer active.
I can see only one way to skin this cat with lisp. you will have to write a script with your lisp routine then have that lisp routine start the script. Finally, you will want the script to close the file so you end up back in your original drawing. At this point, the original lisp routine should resume.
Personally, my approach would be to do the entire exercise with a script.
Hope that helps,
Mike Weaver