是否可以从 VB.NET 加载 Lisp 文件?我目前正在使用 Microsoft Visual Studio 2012 Express 。我试过下面这样的一个。
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
但它没有用。请指导我。提前致谢。
答案 0 :(得分:0)
我和ARX合作,而不是VB.Net,所以可能存在一些差异,但通常你可以使用LISP expresion作为命令。例如:
Dim app As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
Dim command As String = "(load ""C:/path/file.lsp"")"
app.ActiveDocument.SendCommand(command)