改为如下试试:- (defun c:mmll(/ Filename OriginalList PathFilename WinSortList)
- (princ "\n选择要打开的文件:")(princ)
- (if (not *LastFolder)
- (setq *LastFolder (getvar "DWGPREFIX"))
- );if
- (if (setq PathFilename (getfiled " 选择要打开的文件" *LastFolder "dwg" 2))
- (setq *LastFolder (strcat (vl-filename-directory PathFilename) "\"))
- (exit)
- );if
- (textscr)
- (princ (strcat "\n" *LastFolder))
- (setq OriginalList (vl-directory-files *LastFolder "*.dwg" 1))
- (princ (strcat "\n" (chr 160) "\n文件列表:"))
- (foreach Filename OriginalList
- (princ "\n")(princ Filename)
- (command "_ai_editcustfile" (strcat *LastFolder Filename))
- )
- (princ)
- )
|