working with autcad 2007 using c# in windows 7 64bit
-
dears i used to use the following c# .Net 2 code to open autocad 2007 in windows xp sp2 , i just have to add 3 ref. to my vs2005 project (acdbmgd.dll , acmgd.dll , AutoCAD 2007 Type Library )
public Autodesk.AutoCAD.Interop.AcadApplication vAcadApp;
vAcadApp = new AcadApplication(); vAcadApp.Visible = true; vAcadApp.WindowState = Autodesk.AutoCAD.Interop.Common.AcWindowState.acMax; vAcadApp.Documents.Open(FileName, null, null); // filename = test.dwg
now i am trying to reuse the same code but in windows 7 64bit using also autocad 2007 i got a very random results , some times it worked so fine and some times not !! and if it didn't work , i got the following errors Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 800702e4. and sometimes Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 80080005. kindly help me thanks bye
-
dears i used to use the following c# .Net 2 code to open autocad 2007 in windows xp sp2 , i just have to add 3 ref. to my vs2005 project (acdbmgd.dll , acmgd.dll , AutoCAD 2007 Type Library )
public Autodesk.AutoCAD.Interop.AcadApplication vAcadApp;
vAcadApp = new AcadApplication(); vAcadApp.Visible = true; vAcadApp.WindowState = Autodesk.AutoCAD.Interop.Common.AcWindowState.acMax; vAcadApp.Documents.Open(FileName, null, null); // filename = test.dwg
now i am trying to reuse the same code but in windows 7 64bit using also autocad 2007 i got a very random results , some times it worked so fine and some times not !! and if it didn't work , i got the following errors Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 800702e4. and sometimes Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 80080005. kindly help me thanks bye
Your code is runnig 64-bit and you're trying to load a 32-bit component. You cannot mix 32- and 64-bit code in the same process. Go into your project properties on the Compile tab and change the Target from AnyCPU to x86. This forces your app to run 32-bit only, and hence will work with 32-bit components.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Your code is runnig 64-bit and you're trying to load a 32-bit component. You cannot mix 32- and 64-bit code in the same process. Go into your project properties on the Compile tab and change the Target from AnyCPU to x86. This forces your app to run 32-bit only, and hence will work with 32-bit components.
A guide to posting questions on CodeProject[^]
Dave Kreskowiakindeed i already did that http://i.cubeupload.com/NVR16n.jpg[^]
-
indeed i already did that http://i.cubeupload.com/NVR16n.jpg[^]
Then try reversing it. Change it to x64.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Then try reversing it. Change it to x64.
A guide to posting questions on CodeProject[^]
Dave Kreskowiakthe same error seem that i have to use a newer autocad 2012/2013 to be fully compatible with win 64bit