I'm trying to get Excel VBA to load a lisp routine and then run the routine. Currently, I'm able to load AutoCAD. Any suggestions?
Here is the code to load AutoCAD.
Sub GetAutoCAD()
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
End Sub
Thanks!