I am having a really hard time trying to get this lisp to load into autocad. Am I missing something?
Public AcadApp As AcadApplication
Sub lsp()
On Error Resume Next
Set AcadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set AcadApp = CreateObject("AutoCAD.Application")
End If
AppActivate AcadApp.Caption
AcadApp.Visible = True
AcadApp.Application.WindowState = acNorm
AcadDoc.ActiveSpace = acModelSpace
If AcadApp.Documents.Count = 0 Then
AcadApp.Documents.Add
End If
AcadApp.ActiveDocument.SendCommand "(load ""C:/temp/lsp.lsp"") "
AcadApp.ActiveDocument.SendCommand "(c:lsp) "
End Sub
Again, thank you for the help.