Author Topic: Run lsp from Visual Basic  (Read 2184 times)

0 Members and 1 Guest are viewing this topic.

josan

  • Mosquito
  • Posts: 15
Run lsp from Visual Basic
« 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...


Alexander Rivilis

  • Bull Frog
  • Posts: 214
  • Programmer from Kyiv (Ukraine)
Re: Run lsp from Visual Basic
« Reply #1 on: August 23, 2014, 04:28:34 PM »

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Run lsp from Visual Basic
« Reply #2 on: August 23, 2014, 11:06:58 PM »
I would advocate either building dotNET helper LISP functions or rebuilding the LISP code under dotNET.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Run lsp from Visual Basic
« Reply #3 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.
Speaking English as a French Frog