Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. working with autcad 2007 using c# in windows 7 64bit

working with autcad 2007 using c# in windows 7 64bit

Scheduled Pinned Locked Moved C#
csharpcomhelplounge
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AhmedOsamaMoh
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • A AhmedOsamaMoh

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      A 1 Reply Last reply
      0
      • D 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 Kreskowiak

        A Offline
        A Offline
        AhmedOsamaMoh
        wrote on last edited by
        #3

        indeed i already did that http://i.cubeupload.com/NVR16n.jpg[^]

        D 1 Reply Last reply
        0
        • A AhmedOsamaMoh

          indeed i already did that http://i.cubeupload.com/NVR16n.jpg[^]

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Then try reversing it. Change it to x64.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          A 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Then try reversing it. Change it to x64.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            A Offline
            A Offline
            AhmedOsamaMoh
            wrote on last edited by
            #5

            the same error seem that i have to use a newer autocad 2012/2013 to be fully compatible with win 64bit

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups