根据CAD版本自动加载插件
(setq acadver (atof (getvar "acadver")))(cond
((and (>= acadver 16.0) (<= acadver 16.2)) ;;判断CAD版本是否为 2004~06
(arxload (findfile "sys16/即指即显Periscope-R16.arx")) ;;即指即显 for CAD04~06
(NETLOAD (findfile "sys16/剪贴板【Clipboard】-16.dll")) ;;剪贴板 for CAD04~06
)
((and (>= acadver 17.0) (<= acadver 17.2)) ;;判断CAD版本是否为 2007~09
(arxload (findfile "sys17/即指即显Periscope-R17.arx")) ;;即指即显 for CAD07~09
(NETLOAD (findfile "sys16/剪贴板【Clipboard】-17.dll")) ;;剪贴板 for CAD07~09
)
(princ)
06 显示函数已取消 08 显示错误: 参数类型错误: stringp nil
为什么我这个判断不对。不能加载 求修改
怎么没人帮忙解决呀 这个想法好……如果谁完善下让插件加载完这个…不受CAD版本及什么32位64位、系统限制就完美了 (setq acadver (atoi (getvar "acadver")))
(cond
((= acadver 16) ;;判断CAD版本是否为 2004~06
(if (setq arx-Per(findfile "sys16/即指即显Periscope-R16.arx")) (arxload arx-Per)) ;;即指即显 for CAD04~06
(if (setq net-Clip(findfile "sys16/剪贴板【Clipboard】-16.dll")) (NETLOAD net-Clip)) ;;剪贴板 for CAD04~06
)
((= acadver 17) ;;判断CAD版本是否为 2007~09
(if (setq arx-Per(findfile "sys17/即指即显Periscope-R17.arx")) (arxload arx-Per)) ;;即指即显 for CAD07~09
(if (setq net-Clip(findfile "sys17/剪贴板【Clipboard】-17.dll")) (NETLOAD net-Clip)) ;;剪贴板 for CAD07~09
)
)
(princ) 第一确定 剪贴板程序的路径sys16 是16还是17
(NETLOAD (findfile "sys16/剪贴板【Clipboard】-17.dll")) ;;剪贴板 for CAD07~09
第二
(cond 少了结束的括号 )
页:
[1]