LISP only runs in the current document; if you start it from one document it cannot switch to another, so you cannot do this by following commands.
You can use VLISP and ObjectDBX to access the DWG file without opening it in the editor, add the entity, and then save and close.
That's a *very* basic example - is there some specific task you're building up to?