I don't feel comfortable posting the drawing...work related stuff, you know. Let me know if I ran the code right. I copied it to notepad, saved it as .lsp, appload in autocad, executed "foo" command.
I have limited experience in lisp routines so I think it's likely I missed or messed up a step. But after the command nothing changed, not in respect to the invisibility of the viewport anyway.