.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Invoke Lisp functions from ObjectARX in AutoCAD 2015

1 REPLY 1
Reply
Message 1 of 2
Anonymous
667 Views, 1 Reply

Invoke Lisp functions from ObjectARX in AutoCAD 2015

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

1 REPLY 1
Message 2 of 2
_gile
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost