求助:AutoCAD如何启动CAD时自动加载OpenDCL的arx支持文件
各位大师
AutoCAD如何在启动CAD时让其自动判断CAD版本,并自动加载OpenDCL的arx支持文件呢?
(setq TE (GETENV "PROCESSOR_ARCHITECTURE" ))
(setq PO nil)
(setq PO (VL-STRING-SEARCH "64" TE ))
(setq VER (GETVAR "acadver" ))
(setq VER (SUBSTR VER 1 2 ))
(if (/= PO nil )
(PROGN (setq TE (STRCAT "C:\\OpenDCL.x64." VER ".arx" )) )
(PROGN (setq TE (STRCAT "C:\\OpenDCL." VER ".arx" )) )
)
(ARXLOAD TE ) 土土木木人 发表于 2024-9-12 10:09
(setq TE (GETENV "PROCESSOR_ARCHITECTURE" ))
(setq PO nil)
(setq PO (VL-STRING-SEARCH "64" TE ) ...
如果有单独的openDcl文件包,可以实现自动加载这个文件的arx吗 就是单独加载的 函数取消呢,加载进去 (DEFUN LOAD_ARX()
(setq ACAD (SUBSTR (GETVAR "ACADVER" ) 1 2 ))
(setq PROC (= "AMD64" (GETENV "PROCESSOR_ARCHITECTURE" )))
(if (= FOL_PATH nil );路径,如"C:/"
(PROGN
(if PROC
(PROGN (setq FNAME (STRCAT "C:/DOSLib" ACAD "x64.arx" )))
(PROGN (setq FNAME (STRCAT "C:/DOSLib" ACAD ".arx" )))
)
)
(PROGN
(if PROC
(PROGN (setq FNAME (STRCAT FOL_PATH "DOSLib" ACAD "x64.arx" )))
(PROGN (setq FNAME (STRCAT FOL_PATH "DOSLib" ACAD ".arx" )))
)
)
)
(if (FINDFILE FNAME )
(PROGN
(setq JIAZAI (ARXLOAD FNAME nil ))
(if (/= JIAZAI nil )
(PROGN (PROMPT (STRCAT "\n" FNAME "文件加载成功!" )))
(PROGN (PROMPT (STRCAT "\n" FNAME "文件加载失败!" )))
)
)
(PROGN (PROMPT (STRCAT "\n" FNAME "文件没有找到!" )))
)
(setq ODCLREG (STRCAT "HKEY_LOCAL_MACHINE\\" (vlax-product-key ) "\\Applications\\OpenDCL" ))
(if (setqPHD (VL-REGISTRY-READ ODCLREG "Loader" ))
(PROGN
(ARXLOAD PHD nil )
(PROMPT (STRCAT "\n" PHD "文件加载成功!" ))
(setq ODCLREG nil)
(setq PHD nil)
)
(PROGN
(setq TE (GETENV "PROCESSOR_ARCHITECTURE" ))
(setq PO nil)
(setq PO (VL-STRING-SEARCH "64" TE ))
(setq VER (GETVAR "acadver" ))
(setq VER (SUBSTR VER 1 2 ))
(if (= FOL_PATH nil )
(PROGN
(if (/= PO nil )
(PROGN (setq TE (STRCAT "C:/OpenDCL.x64." VER ".arx" )))
(PROGN (setq TE (STRCAT "C:/OpenDCL." VER ".arx" )))
)
)
(PROGN
(if (/= PO nil )
(PROGN (setq TE (STRCAT FOL_PATH "OpenDCL.x64." VER ".arx" )))
(PROGN (setq TE (STRCAT FOL_PATH "OpenDCL." VER ".arx" )))
)
)
)
(if (FINDFILE TE )
(PROGN
(setq JIAZAI (ARXLOAD TE nil ))
(if (/= JIAZAI nil )
(PROGN (PROMPT (STRCAT "\n" TE "文件加载成功!" )))
(PROGN (PROMPT (STRCAT "\n" TE "文件加载失败!" )))
)
)
(PROGN (PROMPT (STRCAT "\n" TE "文件没有找到!" )))
)
)
)
(PRINC )
)
ajunseo 发表于 2024-9-12 10:15
函数取消呢,加载进去
取消干啥?都加载了 肯定是打开odcl面板了 土土木木人 发表于 2024-9-12 10:25
(DEFUN LOAD_ARX()
(setq ACAD (SUBSTR (GETVAR "ACADVER" ) 1 2 ))
(setq PROC (= "AMD64" (GETENV "P ...
这里可以判断是否安装了 opendcl软件,并自动加载 我是把arx文件放在一个独立的文件夹内
页:
[1]