If the error happens when AutoCAD is running, then try
"AutoCAD.Application.17.2" rather than just "AutoCAD.Application".
To create a new instance of AutoCAD you can just use:
AcadApplication app = new AcadApplication();
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6300407@discussion.autodesk.com...
Hi,
I have installed Architecture 2009 standalone version on my local machine. I
am calling autocad document from Windows C# and getting the following error.
Can you help me to fix this error?
"Retrieving the COM class factory for component with CLSID
{28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error:
80080005."
My Code is:
try
{
acadapp =
(AcadApplication)Marshal.GetActiveObject("AutoCAD.Application");
}
catch
{
try
{
Type acType =
Type.GetTypeFromProgID("AutoCAD.Application");
acadapp =
(AcadApplication)Activator.CreateInstance(acType, true);
}
catch (System.Exception ex)
{
};
}
If I use the following code then application is throwing an error as " it is
not able to find out form(class) name"
acadapp =
(Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;