新手,版主帮忙,万分感谢!!!!
我用了版主的程序,还有点问题!<BR>lisp程序:<BR>(defun myarx()<BR> (setq myarxret 50)<BR> )<BR>(vl-acad-defun 'myarx)<BR>C++代码:<BR>resbuf *rb_in1=acutBuildList(RTSTR,"myarx",RTNONE);<BR>resbuf *rb_out1=NULL;<BR>int rd=acedInvoke(rb_in1,&rb_out1);<BR>int x=acedGetSym("myarxret",&rb_out1);<BR>acutPrintf("\n x=%d\n",x,rb_out1->resval.rreal);<BR>为什么运行结果是:<BR> x=5100 1. lsp程序:(defun myfun()<BR> (setq myfunret 44)<BR>)<BR>(vl-acad-defun 'myfun)
2. arx程序
static void acedInvoke_ink(void)<BR> {<BR> // Add your code for command acedInvoke._ink here<BR> resbuf *rb_in = acutBuildList(RTSTR, "myfun", RTNONE);<BR> resbuf *rb_out = NULL;
int rc = acedInvoke(rb_in, &rb_out);<BR> acutRelRb(rb_in);
acedGetSym("myfunret", &rb_out);
int ret = rb_out->resval.rint;
acutRelRb(rb_out);<BR> acutPrintf("\n ret = %d", ret);<BR> }
我试过了,没问题 谢谢版主,我明白了,真是万分感谢!!!
页:
[1]