飞版辛苦了!2004测试成功!若再能支持2000~2002就完美了!写了个自动加载程序,程序根据cad版本自动加载飞版的arx不同版本文件!
- ;;;将dynarxfor2004-2006.arx等四个文件拷贝到CAD支持目录!(autoladdynarx)函数根据CAD不同版本自动加载!
- (defun autoladdynarx (/ loaded fn)
- (cond ((= 16 (atoi (getvar 'acadver)))
- (if (not (member "dynarxfor2004-2006.arx" (arx)))
- (if (setq fn (findfile "dynarxfor2004-2006.arx"))
- (setq loaded (arxload fn "1"))
- (setq loaded "2")
- )
- )
- )
- ((= 17 (atoi (getvar 'acadver)))
- (if (not (member "dynarxfor2007-2009.arx" (arx)))
- (if (setq fn (findfile "dynarxfor2007-2009.arx"))
- (setq loaded (arxload fn "1"))
- (setq loaded "2")
- )
- )
- )
- ((= 18 (atoi (getvar 'acadver)))
- (if (= "x86" (getenv "PROCESSOR_ARCHITECTURE"))
- (if (not (member "dynarxfor2010-2012x32.arx" (arx)))
- (if (setq fn (findfile "dynarxfor2010-2012x32.arx"))
- (setq loaded (arxload fn "1"))
- (setq loaded "2")
- )
- )
- (if (not (member "dynarxfor2010-2012x64.arx" (arx)))
- (if (setq fn (findfile "dynarxfor2010-2012x64.arx"))
- (setq loaded
- (arxload (findfile "dynarxfor2010-2012x64.arx")
- "1"))
- (setq loaded "2")
- )
- )
- )
- )
- )
- (if (= "1" loaded)
- (progn
- (alert "dynarx加载失败!程序将退出!")
- (exit)
- )
- (if (= "2" loaded)
- (progn
- (alert "未找到对应的dynarx文件!程序将退出!")
- (exit)
- )
- (princ "dynarx成功加载!")
- )
- )
- (princ)
- )
|