Alanjt,
代码确实有效,它添加了一个支持文件搜索路径!谢谢你的意见,我可能会对这些问题稍微推敲一下”thingies。
如果你明白我的意思的话,没有一些代码可以阻止双路径。我试了两次,在选项对话框中得到了两次路径“C:\temp”。
尽管我不知道如何开始,但现在让我试着弄清楚,因为我一直都是一个全职的初学者,哈哈。
好的,但首先我把代码去掉了,所以我只需要剩下(想象一下我在这么大的例程中被搞糊涂了LOL)
-
- (defun c:CES-Setup (/ #Files #Layout #Flag)
- (vl-load-com)
- (and
- (not
- (vl-catch-all-error-p
- (vl-catch-all-apply
- '(lambda ()
- (setq #Files (vla-get-files
- (vla-get-preferences (vlax-get-acad-object))
- ) ;_ vla-get-files
- #Layout (vla-get-activelayout
- (vla-get-activedocument (vlax-get-acad-object))
- ) ;_ vla-get-activelayout
- ) ;_ setq
- [color=navy][b](mapcar 'vl-mkdir (list "c:\\TEMP" "c:\\TEMP\\ACAD"))[/b][/color]
- (vla-put-autosavepath #Files "c:\\TEMP\\ACAD")
- (vla-put-supportpath
- #Files
- (strcat ";c:\\temp"
- ";"
- (vla-get-supportpath #Files)
- ) ;_ strcat
- ) ;_ vla-put-supportpath
- ) ;_ lambda
- ) ;_ vl-catch-all-apply
- ) ;_ vl-catch-all-error-p
- ) ;_ not
- (alert
- (strcat
- "AutoCAD has been setup for Capital Engineering & Surveying, Inc. Standards.\n\n"
- " Please restart AutoCAD."
- ) ;_ strcat
- ) ;_ alert
- ) ;_ and
- (princ)
- ) ;_ defun
- (alert "Type: "CES-SETUP" to run setup.")
- (princ)
(你知道,我现在认识的蓝色部分…)
不知何故,我需要toch检查当前的支持文件搜索文件夹是否与新文件夹匹配。如果他们匹配,就跳过那个。。。。
不,真的,我不知道。你能帮助我吗? |