Community
Solved! Go to Solution.
In it's simplest form you could use
(defun c:foo ( / docs ) (vlax-for doc (vla-get-documents (vlax-get-acad-object)) (setq docs (cons (vla-get-fullname doc) docs)) ) )
Which will result in a full name (with path) for any open (but obviously saved) drawing file. However an unsaved document will return an empty string "".
Depends on what you want to use it for. The other document property(s) that may be of use might be "name" and "path".