.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
3212 Views, 13 Replies
02-22-2008 09:12 AM
I started a new Windows application C# project in Visual Studio 2005, my intention is to use COM only in this one, not the .NET wrappers. So I added the references like the Autocad 2008 ActiveX and VBA developers guide states:
To fully access AutoCAD automation objects from Microsoft Visual Studio® .NET, create references to the following files:
• The AutoCAD 2008 type library, acax17enu.tlb, located at c:\program files\common files\autodesk shared.
• The AutoCAD/ObjectDBX Common 17.0 type library, axdb17enu.tlb, located at c:\program files\common files\autodesk shared.
After adding the references I have under project references “AXDBLib”, but it has the yellow warning sign over it. The error list has two lines:
Cannot find wrapper assembly for type library "AXDBLib".
The referenced component 'AXDBLib' could not be found.
So what’s the problem and how to fix it? I can get around the reference error using late binding and referencing nothing, but late binding is kind of unnatural with C#.
Using Visual Studio 2005 and Autocad Architecture 2008.
To fully access AutoCAD automation objects from Microsoft Visual Studio® .NET, create references to the following files:
• The AutoCAD 2008 type library, acax17enu.tlb, located at c:\program files\common files\autodesk shared.
• The AutoCAD/ObjectDBX Common 17.0 type library, axdb17enu.tlb, located at c:\program files\common files\autodesk shared.
After adding the references I have under project references “AXDBLib”, but it has the yellow warning sign over it. The error list has two lines:
Cannot find wrapper assembly for type library "AXDBLib".
The referenced component 'AXDBLib' could not be found.
So what’s the problem and how to fix it? I can get around the reference error using late binding and referencing nothing, but late binding is kind of unnatural with C#.
Using Visual Studio 2005 and Autocad Architecture 2008.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 11:14 AM in reply to:
JanneS
If you have Autocad 2008 installed on the developer's machine, you should have the "Autocad 2008 Type Library" in your list of available com references. Clicking on this reference should link over to Autodesk.Autocad.Interop.dll found in your global assembly cache (GAC).
Once this dll is referenced, you should be able to use normal COM procedures to manipulate the Autocad application, provided it is installed/running on the user's machine.
Once this dll is referenced, you should be able to use normal COM procedures to manipulate the Autocad application, provided it is installed/running on the user's machine.
*Tony Tanzillo
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 11:51 AM in reply to:
JanneS
What the VBA docs say on this doesn't apply to .NET projects.
You don't select any files to add the COM interop assemblies, you just select these two items from the COM tab of the Add References dialog:
AutoCAD 2008 Type Library
AutoCAD/ObjectDBX Common 17.0 Type Library
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
wrote in message news:5856031@discussion.autodesk.com...
I started a new Windows application C# project in Visual Studio 2005, my intention is to use COM only in this one, not the .NET wrappers. So I added the references like the Autocad 2008 ActiveX and VBA developers guide states:
To fully access AutoCAD automation objects from Microsoft Visual Studio® .NET, create references to the following files:
• The AutoCAD 2008 type library, acax17enu.tlb, located at c:\program files\common files\autodesk shared.
• The AutoCAD/ObjectDBX Common 17.0 type library, axdb17enu.tlb, located at c:\program files\common files\autodesk shared.
After adding the references I have under project references “AXDBLib”, but it has the yellow warning sign over it. The error list has two lines:
Cannot find wrapper assembly for type library "AXDBLib".
The referenced component 'AXDBLib' could not be found.
So what’s the problem and how to fix it? I can get around the reference error using late binding and referencing nothing, but late binding is kind of unnatural with C#.
Using Visual Studio 2005 and Autocad Architecture 2008.
You don't select any files to add the COM interop assemblies, you just select these two items from the COM tab of the Add References dialog:
AutoCAD 2008 Type Library
AutoCAD/ObjectDBX Common 17.0 Type Library
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
I started a new Windows application C# project in Visual Studio 2005, my intention is to use COM only in this one, not the .NET wrappers. So I added the references like the Autocad 2008 ActiveX and VBA developers guide states:
To fully access AutoCAD automation objects from Microsoft Visual Studio® .NET, create references to the following files:
• The AutoCAD 2008 type library, acax17enu.tlb, located at c:\program files\common files\autodesk shared.
• The AutoCAD/ObjectDBX Common 17.0 type library, axdb17enu.tlb, located at c:\program files\common files\autodesk shared.
After adding the references I have under project references “AXDBLib”, but it has the yellow warning sign over it. The error list has two lines:
Cannot find wrapper assembly for type library "AXDBLib".
The referenced component 'AXDBLib' could not be found.
So what’s the problem and how to fix it? I can get around the reference error using late binding and referencing nothing, but late binding is kind of unnatural with C#.
Using Visual Studio 2005 and Autocad Architecture 2008.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 01:08 PM in reply to:
JanneS
I already tried that, but the result is exactly the same as explained in my first post.
And in both TLB and COM way the AutoCAD 2008 Type Library reference seems to be OK, only the AutoCAD/ObjectDBX Common 17.0 Type Library fails.
And in both TLB and COM way the AutoCAD 2008 Type Library reference seems to be OK, only the AutoCAD/ObjectDBX Common 17.0 Type Library fails.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 01:10 PM in reply to:
JanneS
Apparently Autodesk.Autocad.Interop.dll is not enough, Autodesk..Autocad.Interop.Common.dll is needed too. I can create AcadApplication, and get the Documents collection, but attempt to use the Open method of the Documents collection results to compile error saying that I need to reference Autocad.Interop.Common.dll.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 04:10 PM in reply to:
JanneS
Do you have multiple versions of CAD installed on your computer. i had some problems with the COM references in my .NET project when i had 2006 and 2007 installed on my machine.
perhaps a repair of AutoCAD is in order.
-Mark Pendergraft
perhaps a repair of AutoCAD is in order.
-Mark Pendergraft
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2008 08:58 PM in reply to:
JanneS
I had 2007 also, just removed it but the reference problem is still the same. Previously i already uninstalled and re-installed 2008, did'nt help either.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-29-2008 11:50 AM in reply to:
JanneS
Weird... the only way i could get the reference to work was to copy the DLL for GAC to a normal directory (C:\temp in this case) and add the reference using the browse tab.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-09-2008 06:03 AM in reply to:
JanneS
I have exactly the same problem. At first I installed AutoCAD 2008 and now after installing Inventor this problem occurs. I have two different versions of these DLL and I don't know which onces are the right ones.
Re: Unable to reference Autodesk.A utoCAD.Int erop.Commo n.dll
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-11-2008 01:02 AM in reply to:
JanneS
Now I solved this problem. I uninstalled AutoCAD 2008 and installed Inventors Mechanical Desktop instead.
Message was edited by: thmsfrst



