3.在appload.lsp文件中,用以下内容替换函数“loadf”
(defun loadf( / n)
(setq no_load 0)
(foreach n (setq er (make_list))
(princ (strcat "\\n加载 " n " ..."))
(cond
((= "lsp" (strcase (substr n (- (strlen n) 2)) T))
(if (= (load n "invalid") "invalid")
(princ(strcat "文件 " n " 未找到。"))
)
)
((or(= "fas" (strcase (substr n (- (strlen n) 2)) T))(= "vlx" (strcase (substr n (- (strlen n) 2)) T)))
(if (= (vl-load n) "invalid")
(princ(strcat "文件 " n " 未找到。"))
)
)
((or (member (strcase n) (arx)) (member (strcase n) (ads)))
(princ (strcat "\\n应用程序 " n " 已加载。"))
)
(T
(if (and (= (arxload n "invalid") "invalid")
(= (xload n "invalid") "invalid")
)
(princ (strcat "\\n文件 " n " 无效。"))
(princ (strcat "\\n文件 " n " 已加载。"))
)
)
)
)
)
4.在appload.lsp文件中找到appload_mail函数中的以下语句:
;; Only check the initial letters as these extensions are
;; good for NT and Windows.
((= (substr (getvar "platform") 1 17) "Microsoft Windows")
(setq filetype "lsp;exe;arx")
)
全部回答(4 )
答:
1.将/vlisp目录加入支持路径中:
可在选项中的文件支持路径中增加该路径;
2.在acadr14.lsp的最后增加以下内容:
;; 以下内容将加载Visual LISP以使FAS、VLX文件有效。
(if (not (member "vlrts.arx" (arx)))
(arxload (findfile "vlrts.arx") )
)
(vlrts-init)
(setvar "lispinit" 0)
(setq *VL-NEW-FULL-INIT* nil)
3.在appload.lsp文件中,用以下内容替换函数“loadf”
(defun loadf( / n)
(setq no_load 0)
(foreach n (setq er (make_list))
(princ (strcat "\\n加载 " n " ..."))
(cond
((= "lsp" (strcase (substr n (- (strlen n) 2)) T))
(if (= (load n "invalid") "invalid")
(princ(strcat "文件 " n " 未找到。"))
)
)
((or(= "fas" (strcase (substr n (- (strlen n) 2)) T))(= "vlx" (strcase (substr n (- (strlen n) 2)) T)))
(if (= (vl-load n) "invalid")
(princ(strcat "文件 " n " 未找到。"))
)
)
((or (member (strcase n) (arx)) (member (strcase n) (ads)))
(princ (strcat "\\n应用程序 " n " 已加载。"))
)
(T
(if (and (= (arxload n "invalid") "invalid")
(= (xload n "invalid") "invalid")
)
(princ (strcat "\\n文件 " n " 无效。"))
(princ (strcat "\\n文件 " n " 已加载。"))
)
)
)
)
)
4.在appload.lsp文件中找到appload_mail函数中的以下语句:
;; Only check the initial letters as these extensions are
;; good for NT and Windows.
((= (substr (getvar "platform") 1 17) "Microsoft Windows")
(setq filetype "lsp;exe;arx")
)
将(setq filetype "lsp;exe;arx")替换为
(setq filetype "lsp;fas;vlx;exe;arx")
这样就可以在“加载应用程序”对话框中直接加载fas和vlx文件。