Hi
Can some one help me please I have an excel vba program which was working with office 365 and AutoCAD 2018LT. Now I've got a new machine with AutoCAD 2019 and it fails on opening AutoCAD. I've updated the refs to 2019 - (the only ref I couldn't find was AcFocusCtrl16.dll if that's the issue where can I get it?) but I get a application defined or object defined error. I've tried Set Graphics New AcadApplication but this doesn't work either.
Any help would be greatly received.
Rick
'Open AutoCAD DIN Cabinet file
'Dim Graphics As Object
Dim dwg As Object
Dim Graphics As AcadApplication
'Dim dwg As AcadDocument
On Error Resume Next
Set Graphics = GetObject(, "AutoCAD.Application")
If Graphics Is Nothing Then
'AutoCAD is not running or not reacting, so we create a new process
Set Graphics = CreateObject("AutoCAD.Application")
End If
If Graphics Is Nothing Then
'if that failed too something not correct
UFWait.Hide
MsgBox "Failed to open AutoCAD open manually and try again", vbCritical
Exit Sub
Else
Set dwg = Graphics.Documents.Open(CADRS)
Graphics.Visible = True
On Error GoTo 0
End If
Solved! Go to Solution.
Solved by pendean. Go to Solution.
Solved by steven-g. Go to Solution.
AutoCAD LT doesn't respond to external open commands, that is only available with the full version of AutoCAD so I would be very surprised if it used to work with 2018LT, to be honest, I would be very pleased if it did, but the API's required for this are not in LT.
Can't find what you're looking for? Ask the community or share your knowledge.