Hello Everyone,
I am new to programming AutoCad using .Net. I am trying to create a standalone C#/.Net Application to manipulate the dwg files.
While creating an instance of AcadApplication using following code, I am getting a crash which I can't comprehend completely.
Type acType = Type.GetTypeFromProgID("AutoCAD.Application.18.1");
AcadApplication acApp = null; acApp = (AcadApplication)Activator.CreateInstance(acType,true);
I get the followng error message.
Unable to cast COM object of type 'Autodesk.AutoCAD.Interop.AcadApplicationMinorVersion1Class' to interface type 'AutoCAD.AcadApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{070AA05D-DFC1-4E64-8379-432269B48B07}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Although, I can see an instance of acad.exe getting started in taskmanager, but value of acApp is still null.
Other informations:
Visual Studio Version : VS 2012 Express Edition
AutoCaD Version : AutoCAD 2012 x64 version
OS : Windows 7, x64 version.
Thanks in advance,
Durgesh