明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2495|回复: 3

[推荐]ARX程序調LISP程序

[复制链接]
发表于 2004-9-23 08:49 | 显示全部楼层 |阅读模式
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===============
发表于 2005-2-24 20:04 | 显示全部楼层
',
发表于 2005-4-8 00:13 | 显示全部楼层
myfun带了参数怎么搞


(参数个数不定,或类型不定)?
发表于 2005-12-16 09:24 | 显示全部楼层
有没有一个完整的实例呢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-3-29 03:53 , Processed in 0.166864 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表