Tim,
I like it, but is there anyway you can pass the default folder to your Directory-Dia function?
Here's the method that I've been using so the AutoCAD users can also view the drawings in the folder they are selecting.
This version uses the global variable *LastPath$ to remember the last folder selected.
Terry
Code:
(defun GetPathName (/ PathFile$)
(if (not *LastPath$)
(setq *LastPath$ (getvar "DWGPREFIX"))
);if
(if (setq PathFile$ (getfiled "Select a Drawing in a folder for Folder name" *LastPath$ "dwg" 2))
(setq *LastPath$ (strcat (vl-filename-directory PathFile$) "\\"))
);if
);defun GetPathName
I removed (exit) from the function, but you might want to check it's value before continuing in your program. Something like this:
Code:
(if (not (setq Pathname$ (GetPathName)))
(progn
(alert "No Folder was selected.")
(exit)
);progn
);if