.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.net interop with Land DT

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
737 Views, 6 Replies

.net interop with Land DT

I'm trying to build an app. from VB.net that automates various versions of ACAD by using the com interop object. Of course I have to reference in the type libraries for each acad version, and that has gone along ok.

When I try to reference in the Autodesk Land 4.0 type lbrary (LandAuto.tlb) I get an error message:
"A reference to 'Autodesk Land 4.0 Type Library' could not be added. Converting the type library to a .NET assembly failed. Could not load type AutoCADLand.IAeccContour from assembly Interop.AutoCADLand, Version=4.0.0.0."

The reference works fine in VB 6. I would think it would be ok in .Net.

Does anyone know how to make this reference?
6 REPLIES 6
Message 2 of 7
saluki
in reply to: Anonymous

Mark,

I've been having the same problem. Did you find a resolution?

If any one has a sample vb.net routine that will run with LD 2005 and/or 2006. I would appreciate seeing a sample.

Thanks in advance.
Message 3 of 7
Anonymous
in reply to: Anonymous

There is no solution. ADSK has entered this as a bug to get fixed. I posted this request through DevHelp already.

They said they would put it on the list of bugs but did not make any promises.

Hugo
Message 4 of 7
saluki
in reply to: Anonymous

Is there a work around, or can .net not interact w/ LD 2005?

thanks
Message 5 of 7
cgay
in reply to: Anonymous

Maybe you could generate the Interop assembly yourself, instead of adding a reference to the type library, using tlbimp.exe?

"The Type Library Importer utility (tlbimp.exe) is a command line tool that reads COM type information (typically contained in *.tlb, *.dll or *.exe files) and generates a corresponding .NET interop assembly."
Message 6 of 7
Anonymous
in reply to: Anonymous

I suspect you will have problems importing the type library in a .NET project as I have. The issue at hand is that the type library has to be coded so that it is importable? into a .NET framework project.

I tried using Borland's type library importer as well as Microsoft's and they both fail.

As mentioned before, ADSK has reproduced this problem but have no schedule for when it may get resolved.
Message 7 of 7
saluki
in reply to: Anonymous

I tried using

http://www.aurigma.com/Products/COMtoNET/

In .net it seems to work, I can work my way throught he object model and my code appears correct. When I run it I get this error.

An unhandled exception of type 'System.NullReferenceException' occurred in microsoft.visualbasic.dll

Additional information: Object variable or With block variable not set.

Is this due to problems with the type library?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost