[推荐]ARX程序調LISP程序
You can directly call lisp function from ObjectARX application using<BR>acedInvoke(...).<BR><BR>See example:<BR><BR>=========LISP code start==============<BR>(defun myfun()<BR> (setq myfunret 2)<BR>)<BR>;<BR>; If you want to be able to invoke this function from an external ObjectARX<BR>; application, you can use vl-acad-defun to make the function accessible.<BR>;<BR>(vl-acad-defun 'myfun)<BR>=========LISP code end===============<BR><BR>=========C++ code start==============<BR>int call_lisp_function(void)<BR>{<BR> resbuf *rb_in = acutBuildList(RTSTR,"myfun",RTNONE);<BR> resbuf *rb_out = NULL;<BR> int rc = acedInvoke(rb_in,&rb_out);<BR> acutRelRb(rb_in); acutRelRb(rb_out);<BR> acedGetSym("myfunret",&rb_out);<BR> return (RSRSLT) ;<BR><FONT color=#660066>}</FONT><BR><BR>=========C++ code end===============<BR> ', myfun带了参数怎么搞(参数个数不定,或类型不定)? 有没有一个完整的实例呢
页:
[1]