h2023197 发表于 2004-10-13 11:13:00

新手,版主帮忙,万分感谢!!!!

我用了版主的程序,还有点问题!
lisp程序:
(defun myarx()
       (setq myarxret 50)
       )
(vl-acad-defun 'myarx)
C++代码:
resbuf *rb_in1=acutBuildList(RTSTR,"myarx",RTNONE);
resbuf *rb_out1=NULL;
int rd=acedInvoke(rb_in1,&rb_out1);
int x=acedGetSym("myarxret",&rb_out1);
acutPrintf("\n x=%d\n",x,rb_out1->resval.rreal);
为什么运行结果是:
        x=5100

王咣生 发表于 2004-10-13 18:57:00

1. lsp程序:
(defun myfun()
       (setq myfunret 44)
)
(vl-acad-defun 'myfun)
2. arx程序
        static void acedInvoke_ink(void)
        {
                // Add your code for command acedInvoke._ink here
                resbuf *rb_in = acutBuildList(RTSTR, "myfun", RTNONE);
                resbuf *rb_out = NULL;
                int rc = acedInvoke(rb_in, &rb_out);
                acutRelRb(rb_in);
                acedGetSym("myfunret", &rb_out);
                int ret = rb_out->resval.rint;
                acutRelRb(rb_out);
                acutPrintf("\n ret = %d", ret);
        }
我试过了,没问题

h2023197 发表于 2004-10-14 09:28:00

谢谢版主,我明白了,真是万分感谢!!!
页: [1]
查看完整版本: 新手,版主帮忙,万分感谢!!!!