• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Contributor
    Posts: 20
    Registered: ‎02-16-2005

    .net interop with Land DT

    389 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?
    Please use plain text.
    Distinguished Contributor
    Posts: 188
    Registered: ‎09-18-2005

    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.
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎09-05-2005

    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
    Please use plain text.
    Distinguished Contributor
    Posts: 188
    Registered: ‎09-18-2005

    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
    Please use plain text.
    Distinguished Contributor
    Posts: 125
    Registered: ‎08-02-2005

    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."
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎09-05-2005

    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.
    Please use plain text.
    Distinguished Contributor
    Posts: 188
    Registered: ‎09-18-2005

    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?
    Please use plain text.