Author Topic: Use arx to trans arbitary arguments to lisp function?  (Read 1292 times)

0 Members and 1 Guest are viewing this topic.

xinxirong

  • Mosquito
  • Posts: 17
Use arx to trans arbitary arguments to lisp function?
« on: April 06, 2017, 07:25:43 PM »
for example
(defun myadd ( lst / )
  (mapcar '+ lst)
)
in arx,defun a ads function tran_args_fun.
then i can use (tran_args_fun 'myadd 1 2 3 4 5 6....) to subsitude the lisp fun +.

xinxirong

  • Mosquito
  • Posts: 17
Re: Use arx to trans arbitary arguments to lisp function?
« Reply #1 on: April 06, 2017, 08:29:27 PM »
you call acedInvoke
Other way is calling undocumented function acedEvaluateLisp():
int __cdecl acedEvaluateLisp(wchar_t const *str, struct resbuf *&result);
where str is a lisp-expression, and result is a result of evaluation of this lisp-expression