Quickly scribbled together:
(defun c:docset ( / file lst )
(vl-load-com)
;; © Lee Mac 2010
(if
(while (setq file (getfiled "Select File to Add to Drawing" (cond ( file (vl-filename-directory file) ) ( "" )) "" 16))
(setq lst (cons file lst))
)
(vlax-ldata-put "DocManagerDocs" "docs" (acad_strlsort lst))
)
(princ)
)
(defun c:docget ( / _OpenFiles data )
(vl-load-com)
;; © Lee Mac 2010
(defun _OpenFiles ( files / Shell )
(setq Shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application"))
(mapcar
(function
(lambda ( file )
(if
(vl-catch-all-error-p
(vl-catch-all-apply
(function vlax-invoke) (list Shell 'Open file)
)
)
(princ (strcat "** Error Opening: " file " **"))
)
)
)
files
)
(vlax-release-object Shell)
)
(if (setq data (vlax-ldata-get "DocManagerDocs" "docs"))
(_OpenFiles
(vlax-ldata-put "DocManagerDocs" "docs"
(vl-remove-if-not 'findfile data)
)
)
)
(princ)
)
DocSet, stores filename data in drawing dictionary, continuous file selection prompts until user hits cancel.
DocGet, opens stored files.
I'm sure it could be improved upon,
Lee