.NET

Reply
Contributor
markc01
Posts: 20
Registered: ‎02-16-2005
Message 1 of 7 (401 Views)

.net interop with Land DT

401 Views, 6 Replies
09-02-2005 04:27 PM
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?
Distinguished Contributor
saluki
Posts: 188
Registered: ‎09-18-2005
Message 2 of 7 (401 Views)

Re: .net interop with Land DT

10-27-2005 08:39 PM in reply to: markc01
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.
Member
hguerrero
Posts: 4
Registered: ‎09-05-2005
Message 3 of 7 (401 Views)

Re: .net interop with Land DT

10-28-2005 10:01 PM in reply to: markc01
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
Distinguished Contributor
saluki
Posts: 188
Registered: ‎09-18-2005
Message 4 of 7 (401 Views)

Re: .net interop with Land DT

10-29-2005 07:21 AM in reply to: markc01
Is there a work around, or can .net not interact w/ LD 2005?

thanks
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 5 of 7 (401 Views)

Re: .net interop with Land DT

10-31-2005 12:51 PM in reply to: markc01
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."
Member
hguerrero
Posts: 4
Registered: ‎09-05-2005
Message 6 of 7 (401 Views)

Re: .net interop with Land DT

11-04-2005 11:21 PM in reply to: markc01
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.
Distinguished Contributor
saluki
Posts: 188
Registered: ‎09-18-2005
Message 7 of 7 (401 Views)

Re: .net interop with Land DT

11-06-2005 03:23 PM in reply to: markc01
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?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community