easypower 发表于 2004-9-23 08:49:00

[推荐]ARX程序調LISP程序

You can directly call lisp function from ObjectARX application using
acedInvoke(...).
See example:
=========LISP code start==============
(defun myfun()
       (setq myfunret 2)
)
;
; If you want to be able to invoke this function from an external ObjectARX
; application, you can use vl-acad-defun to make the function accessible.
;
(vl-acad-defun 'myfun)
=========LISP code end===============
=========C++ code start==============
int call_lisp_function(void)
{
                       resbuf *rb_in = acutBuildList(RTSTR,"myfun",RTNONE);
                       resbuf *rb_out = NULL;
                       int rc = acedInvoke(rb_in,&rb_out);
                       acutRelRb(rb_in); acutRelRb(rb_out);
                       acedGetSym("myfunret",&rb_out);
                       return (RSRSLT) ;
}
=========C++ code end===============

wadezhang 发表于 2005-2-24 20:04:00

',

aeo000000 发表于 2005-4-8 00:13:00

myfun带了参数怎么搞
(参数个数不定,或类型不定)?

Miracle 发表于 2005-12-16 09:24:00

有没有一个完整的实例呢
页: [1]
查看完整版本: [推荐]ARX程序調LISP程序