大佬这是什么函数?没见过呀
@lisp 核心的部分代码。加载 @lisp 时对CAD软件的厂商 进行初步测定。
然后在后面的应用中就可以针对不同的CAD软件写差异化代码了。
(setq @:products '("AutoCAD" "GstarCAD" "ZWCAD" "BricsCAD"))
(setq fasext ".fas")
(setq is-gstarcad nil
is-bricscad nil
is-zwcad nil
is-autocad nil
@:cad-platform (getvar "product"))
"中望,浩辰特殊定义"
(cond
((string-equal "GstarCAD" (getvar "product"))
;;(or (findfile "icad.pgp")(findfile "gcad.pgp"))
(setq @:pgp-file "gcad.pgp")
(setq @:locale "chs")
(setq is-gstarcad T)
(setq is-gcad T))
((string-equal "ZWCAD" (getvar "product"))
(setq @:pgp-file "ZWCAD.pgp")
(setq @:locale "chs")
(if (> (read (getvar "zrxvernum")) 2017)
(setq fasext ".zelx"))
(setq is-zwcad T))
((string-equal "bricscad" (getvar "product"))
(setq @:pgp-file "default.pgp")
(setq is-bricscad T)
(setq fasext ".des")
(setq @:locale (strcase (getvar "locale") T)))
((string-equal "autocad" (getvar "product"))
(setq @:pgp-file "acad.pgp")
(setq is-autocad t)
(cond
((= (getvar "syscodepage") "ANSI_936")
(setq @:locale "chs"))
((= (getvar "syscodepage") "ANSI_950")
(setq @:locale "cht"))
(t (setq @:locale (strcase (getvar "locale") T)))
))
(t(setq @:locale "chs")(setq @:pgp-file "acad.pgp"))
) 本帖最后由 zml84 于 2023-3-14 19:57 编辑
页:
1
[2]