Gropes,
I do not have your answer but I see something in your program others might not be aware of...
(command ".undo" "begin")
Since about 2004 the editor recognizes LISP and will skip completely over the routine when one manually uses the Undo command - without including a skip over a command previous to the routine being run. Hard to explain... it is like the LISP expression is now a command...
Unfortunately the undo begin and undo end markers does not work inside a routine if there are AutoCAD commands inside the routine - it will not skip completely over the routine, or skip to the beginning/ending markers, rather continues to stop just before each command inside the routine. Setting OSMODE or CMDECHO just before the command inside a routine is par for the course, but when one uses undo tags, it still stops between the OSMODE/CMDECHO line and the command line. I have not tried this on 2007, my guess it is still broken.
My best advise to you is to remove all undo's from your program and tell others that when this routine is run, do not undo, rather erase and keep going forward.
Good Luck!
Scot-65
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.