Invoke Lisp functions from ObjectARX in AutoCAD 2015

Invoke Lisp functions from ObjectARX in AutoCAD 2015

Anonymous
Not applicable
789 Views
1 Reply
Message 1 of 2

Invoke Lisp functions from ObjectARX in AutoCAD 2015

Anonymous
Not applicable

Hi,

 

I am facing issues while invoking simple Lisp function from ObjectARX in AutoCAD 2015.

 

The Lisp Function

---------------------------------------

(defun myFunc2()
  (alert "myFunc2")
)
(vl-acad-defun 'myFunc2)

 

If I call this function from ObjectARX the AutoCAD freezes. This is happening only when executing from VLIDE editor. If I use AutoCAD command prompt no issues.

 

My ObjectARX code to call the above function is...

 

resbuf *rb_in = acutBuildList(RTSTR, TEXT("myFunc2"),
RTNONE);
resbuf *rb_out = NULL;
int rc = acedInvoke(rb_in, &rb_out);
acutRelRb(rb_in);
rb_in = NULL;
acutRelRb(rb_out);
rb_out = NULL;

 

Thanks in advance.

 

Nishant

0 Likes
790 Views
1 Reply
Reply (1)
Message 2 of 2

_gile
Consultant
Consultant

Hi,

 

If you're using .NET (managed code), since AutoCAD 2011, you can use the Application.Invoke() method which wraps acedInvoke().



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes