- (defun myopenpath (filepath )
- (or *winshell
- (setq *winshell (vlax-create-object "Shell.Application" ))
- )
- (vlax-invoke-method *winshell 'Open filepath)
- )
- ;; =============================================
- ;; | 打开文件夹内所有图纸 |
- ;; =============================================
- (defun c:DKTZ (/ fn ml lst2 file)
- (or ml (setq ml ""))
- (setq
- fn (GetFiled "选择dwg文件" ml "dwg" 16)
- ml (vl-filename-directory fn)
- lst2 (vl-directory-files ml "*.dwg");列出文件夹内文件
- )
- (foreach file lst2
- (myopenpath (strcat ml "\" file))
- )
- (princ)
- )
- 这样不行吗
|