TheSwamp

Code Red => .NET => Topic started by: josan on August 23, 2014, 11:05:53 AM

Title: Run lsp from Visual Basic
Post by: josan on August 23, 2014, 11:05:53 AM
Good day.
Can I from Visual Basic Express 2010 create an application that will allow me to run AutoCAD and then load a *.lsp file and it runs?

thanks...

Title: Re: Run lsp from Visual Basic
Post by: Alexander Rivilis on August 23, 2014, 04:28:34 PM
http://www.theswamp.org/index.php?topic=33352.0
Title: Re: Run lsp from Visual Basic
Post by: dgorsman on August 23, 2014, 11:06:58 PM
I would advocate either building dotNET helper LISP functions or rebuilding the LISP code under dotNET.
Title: Re: Run lsp from Visual Basic
Post by: gile on August 24, 2014, 03:47:08 AM
I would advocate either building dotNET helper LISP functions or rebuilding the LISP code under dotNET.

+1

Anyway, since AutoCAD 2011, you can use the Application.Invoke() .NET function (which wraps the acedInvoke() ObjectARX function) to call a LISP function from a .NET application and get its return value. The LISP function that is called must be previously-registered using the (vl-acad-defun) function or must have a C: prefix.