几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】[推荐]arx程序調lisp程序 (http://www.dimcax.com/hust/showthread.php?t=6577)

yang686526 2009-04-16 01:31 PM

【转帖】[推荐]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.