0

Is that possible to load a Lisp file from VB.NET? I am currently using Microsoft Visual Studio 2012 Express. I tried one like this below.

Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Interop

Public Class CLass1
    Public Sub LoadLisp()
        Dim app As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
        Dim command As String = "(load ""F:/HVAC Tools/My Duct/combine_to_acad.vlx"")"
        app.SendCommand(command)
    End Sub
End Class

But It doesn't work.Please guide me. Thanks in advance.

peteroo
  • 23
  • 9

1 Answers1

0

I'm working with ARX, not VB.Net, so maybe there are some differences, but generaly You may use LISP expresion as command. for example like this:

Dim app As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication         
Dim command As String = "(load ""C:/path/file.lsp"")"
app.ActiveDocument.SendCommand(command)
CAD Developer
  • 1,532
  • 2
  • 21
  • 27
  • Thanks for your help, but I am not strong in VB.NET. – peteroo Apr 18 '18 at 14:48
  • So what do You expect? You have sample code to load LISP file by VB.net . that's not what You asked for? – CAD Developer Apr 19 '18 at 05:55
  • Sorry, that comment was wrong sent. Actually, I didn't mean to send. I just typed it ,and wrong click "Enter". I forgot to delete it. Sorry bro. – peteroo Apr 20 '18 at 06:07
  • I tried the similar one to the above one that you sampled. But I used ` _`. And, I want to modify it to load at **Startup** without using **Command**. – peteroo Apr 20 '18 at 09:00
  • So You may load lisp at startup without VB.Net. check here https://stackoverflow.com/questions/48638593/what-is-the-order-of-load-autocad-plugins – CAD Developer Apr 20 '18 at 09:51