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

[推荐]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,&amp;rb_out);<BR>                       acutRelRb(rb_in); acutRelRb(rb_out);<BR>                       acedGetSym("myfunret",&amp;rb_out);<BR>                       return (RSRSLT) ;<BR><FONT color=#660066>}</FONT><BR><BR>=========C++ code end===============<BR>

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程序