DC and Visual Basic Express 2008

Started by nigeldavies, August 07, 2009, 10:52:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nigeldavies

I cannot seem to get DC to start from VB Express 2008 (casting errors etc).  I did try using DT's snippet from Sept 10 2007 but VB 2008 does not like much of it.  Can anyone please give me a complete idiots guide to achieving this?

Thanks in anticipation.

DrollTroll

#1
Hi Nigel.

What version of DesignCAD are you using, and what's the basic problem?

Did you make a form, and paste the code into the Button_click subroutine? If so, be sure to move the Imports statements to the top of the code, outside the Form1 class. Or better yet, cut them from the code and make sure they are checked in the References list in the Project Properties dialog. (Project/<project name> Properties..., activate the References tab, scroll through the Imported Namespaces list and put checkmarks beside Microsoft.Win32 and System.Threading.)

If you're using Dcad19, I have *just now* discovered a registry bug. In that case change this line:
                Dim SubKey As String = "DesignCAD.DCD-Document\shell\open\command"
to
                Dim SubKey As String = "DesignCAD.DCD-Document.19\shell\open\command"

and change this line:
                Dim DcPath2 = DcPath.Remove(DcPath.Length - 5, 5)
to
                Dim DcPath2 = DcPath.Remove(DcPath.Length - 3, 3)

EDIT: added sample project as attachment
25 years with DesignCAD

nigeldavies

Many thanks DT!     :)

Your sample project works fine and you correctly guessed the version was 19.

Problem is now I have got started on the project I will probably be bugging you with further requests!

However I am sure the SDK help etc. will solve most of them.

Thanks again.