本帖最后由 jh1005 于 2012-9-3 23:56 编辑
1.解压到D盘,把ARX目录加入CAD搜索目录,用(Load-ODcl)函数加载OpenDcl的Arx文件。
2.样例目录在\ENU\Samples,里面的例子要用(Load-ODcl)替代(command "_OPENDCL")
;例如:
- (defun c:test()
- (Load-ODcl) ;加载arx,替代安装版的(command "_OPENDCL")
- (dcl_Project_Load "test.odcl") ;读取ODcl文件,test.odcl放搜索目录或指定路径
- (dcl_Form_Show "test_窗体名") ;显示对话框
- (princ)
- )
- (defun Load-ODcl (/ fn) ;加载OpenDcl*.arx
- (or
- (member (strcase (strcat "OpenDCL." (substr (getvar "ACADVER") 1 2) ".arx") t) (arx))
- (and (setq fn (findfile (strcat "OpenDCL." (substr(getvar "ACADVER") 1 2) ".arx"))) (arxload fn))
- (t (alert (strcat "\n路径中无OpenDCL.arx或Runtime.Res.dll文件,加载不成功!")) (exit))
- )
- (princ)
- )
|