While the AutoCAD application is opened by manually and after that if I run the mentioned code then it is fine.
But while crating object (Opening AutoCAD using Code) I am getting the error message thet " Cannot create ActiveX component "
Dim objAcadApp As AcadApplication
Try
objAcadApp = GetObject(, "AutoCAD.Application.19")
If objAcadApp Is Nothing Then
objAcadApp = CreateObject("AutoCAD.Application.19")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try