尽管如此,你仍然可以自动化你的工作
- (vl-load-com)
- (defun Test (Path / SupportPath FilesObj)
- (setq FilesObj (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
- (setq SupportPath (strcat (vla-get-SupportPath FilesObj) ";"))
- (foreach Folder (vl-remove-if-not
- 'vl-file-directory-p
- (mapcar (function (lambda (f) (strcat Path "\" f)))
- (cddr (vl-directory-files Path))
- )
- )
- (if (not (vl-string-search (strcat Folder ";") SupportPath))
- (setq SupportPath (strcat SupportPath (strcat Folder ";")))
- )
- )
- (vla-put-SupportPath FilesObj SupportPath)
- (vlax-release-object FilesObj)
- (princ)
- )
- (test "P:\\company name\\drawing office\\design\\tool palettes\\cad blocks")
需要测试! |