DesignCAD User Forum

DesignCAD SDK => COM, OLE Automation, .NET => Topic started by: RDBarthel on December 27, 2017, 09:41:15 AM

Title: OLE Automation / Windows 10 / VB Express 2013 / Reference to Dcad25x64.TLB
Post by: RDBarthel on December 27, 2017, 09:41:15 AM
VB Express 2013 compiled my program successfully when I was using DesignCAD 24 and Windows7.  Since then I upgraded to Windows 10 and DesignCAD 25 and the compiled program continued running just fine.  But now I want to "tweek" the code and the code won't compile.

My code contains these commands

    Dim DcApp As DesignCAD.Application
    Dim DcDocs As DesignCAD.Documents
    Dim DcDoc As DesignCAD.Document

Each command raises the error "Type ... is not defined."  This tells me the DesignCAD type library is not properly referenced.  There is a warning
   "Cannot get the file path for type library "...a long registry key ..." version 24.0. Library not registered."

I used Regserver to register the DesignCAD 25 TLB but when I try to add the Dcad25x64.TLB reference I get the error

   "A reference to 'DesignCAD 25.0 Type Library' could not be added. Could
    not register the ActiveX type library 'C:\Program
    Files\IMSIDesign\DesignCAD 3D Max 25\Dcad25x64.TLB'."

What do I do to complete adding the reference?  What do I do to remove the reference to the DesignCAD 24 TLB?
Title: Re: OLE Automation / Windows 10 / VB Express 2013 / Reference to Dcad25x64.TLB
Post by: RDBarthel on December 27, 2017, 01:04:20 PM
Found the solution.

In the Solution Properties under References I removed the reference to the DesignCAD 24 TLB.  That eliminated the error  "Cannot get the file path for type library "...a long registry key ..." version 24.0. Library not registered."

I could then under "Project" and "Add Reference..." select the DesignCAD 25 TLB.  That eliminated the "Type ... is not defined" error.

Thanks to anyone who might have given this any thought.