可以的!用向导定义一个外部函数,和Lisp通讯即可!
- static int ads_test(void)
- {
- //----- Remove the following line if you do not expect any argument for this ADS function
- struct resbuf *pArgs =acedGetArgs () ;
- // TODO: add your code here
- if (pArgs == NULL)
- {
- acdbFail(_T("参数太少"));
- return RTERROR;
- }
- if (pArgs->restype != RTPICKS)
- {
- acdbFail(_T("参数错误"));
- return RTERROR;
- }
- //ss 为Lisp传递进来的选择集
- ads_name ss;
- ads_name_set(pArgs->resval.rlname,ss);
- //添加对ss进行处理的后续代码
- ....
- // TODO: Replace the following line by your returned value if any
- acedRetVoid () ;
- return (RSRSLT) ;
- }
在Lisp中用如下方式调用:
(test (ssget)) |