![]() |
【转帖】[推荐]arx程序調lisp程序
[推荐]arx程序調lisp程序
[推荐]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=============== 【精华】专题管理 [easypower | ', myfun带了参数怎么搞 (参数个数不定,或类型不定)? 有没有一个完整的实例呢 |
| 所有的时间均为北京时间。 现在的时间是 06:12 PM. |