Here is a quick one. I have work to do, so I don't know if I will be able to play later. Its real simple. It will return a list of all the drawings selected. It won't check to see if the drawing is already there, and no way to remove any. Attached is my dialog boxes that one of the functions use. Here is how to use it
(setq listDwg (SelectMultiple))
(defun SelectMultiple (/ DirPath listDwg DiaRtn listFinal)
(while (setq DirPath (Directory-dia ""))
(if
(and
(setq listDwg (vl-directory-files DirPath "*.dwg" 1))
(setq DiaRtn (MultiSelect listDwg "Select all." T))
)
(if (equal (car DiaRtn) T)
(foreach dwg listDwg
(setq listFinal (cons (strcat DirPath dwg) listFinal))
)
(foreach num DiaRtn
(setq listFinal (cons (strcat DirPath (nth num listDwg)) listFinal))
)
)
)
)
listFinal
)
;---------------------------------------------------------------------------------------------------
(defun Directory-Dia ( Message / sh folder folderobject result)
;; By Tony Tanzillo
;; Modified by Tim Willey
;; 16 Will let you type in the path
;; 64 Will let you create a new folder
(vl-load-com)
(setq sh
(vla-getInterfaceObject
(vlax-get-acad-object)
"Shell.Application"
)
)
(setq folder
(vlax-invoke-method
sh
'BrowseForFolder
(vla-get-HWND (vlax-get-Acad-Object))
Message
0 ; This is the bit number to change.
)
)
(vlax-release-object sh)
(if folder
(progn
(setq folderobject
(vlax-get-property folder 'Self)
)
(setq result
(vlax-get-property FolderObject 'Path)
)
(vlax-release-object folder)
(vlax-release-object FolderObject)
(if (/= (substr result (strlen result)) "\\")
(setq result (strcat result "\\"))
result
)
)
)
)
;--------------------------------------------------------------------
(defun MultiSelect (Listof Message Toggle / DiaLoad tmpStr tmpTog tmpList)
(setq DiaLoad (load_dialog "MyDialogs.dcl"))
(if (new_dialog "MultiSelect" DiaLOad)
(progn
(start_list "listbox" 3)
(mapcar 'add_list Listof)
(end_list)
(if Message
(set_tile "text1" Message)
)
(if (not Toggle)
(mode_tile "toggle1" 1)
)
(mode_tile "listbox" 2)
(action_tile "accept"
"(progn
(setq tmpStr (get_tile \"listbox\"))
(if Toggle
(setq tmpTog (get_tile \"toggle1\"))
)
(done_dialog 1)
)"
)
(action_tile "cancel" "(done_dialog 0)")
(if (= (start_dialog) 1)
(progn
(if tmpStr
(setq tmpList (read (strcat "(" tmpStr ")")))
)
(if (= tmpTog "1")
(cons T tmpList)
tmpList
)
)
)
)
)
)