I'm trying to launch AutoCAD with the following code in visual studio on an win 7 machine:
code:-
string progID = "AutoCAD.Application.18.1";
System.Type acType = System.Type.GetTypeFromProgID(progID);
Autodesk.AutoCAD.Interop.AcadApplication autoCADApp = null;
try
{
autoCADApp = (Autodesk.AutoCAD.Interop.AcadApplication)System.Activator.CreateInstance(acType);
autoCADApp.Visible = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
This code works some time and sometimes gives above error, I get the following error: Creating an instance of ther COM Component with CLSID {big long hex number} from the IClassFactory failed due to the following error: 80010001a ?
Can't find what you're looking for? Ask the community or share your knowledge.