查看单个帖子
旧 2009-04-16, 01:31 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】[推荐]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带了参数怎么搞
(参数个数不定,或类型不定)?
有没有一个完整的实例呢
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)