Register
 
DesignCAD 2019 and DesignCAD 3D Max 2019 now available for sale!
https://www.turbocad.com/designcad/ OR
https://www.imsidesign.com/products/designcad

Launching DC V24 by OLE
Read 2212 times
* February 15, 2015, 06:31:05 AM
  Launching DC 24 with
 
        On Error Resume Next
        DcApp = GetObject(,"DesignCAD.Application")
        If DcApp Is Nothing Then
            DcApp = New DesignCAD.Application
        End If
      
fails, DC V23 is launched.

I have tried Dcad24 /regserver and running once as administrator. Dcd files
are assigned to V24, this works (but not lauching by OLE).

Renaming dcad23.exe helps.

This is also fine:

        If DcApp Is Nothing Then
            Dim SubKey As String = "DesignCAD.DCD-Document.24\shell\open\command"
            Dim rk As RegistryKey = Registry.ClassesRoot.OpenSubKey(SubKey)
            Dim DcPath As String = CType(rk.GetValue("", ""), String)
            Dim DcPath2 = DcPath.Remove(DcPath.Length - 3, 3)
            Process.Start(DcPath2)
            Thread.Sleep(2500)
            DcApp = GetObject(, "DesignCAD.Application")
        End If
      
I guess this is a matter of the registry.
Does someone know a better solution?

Kind regards,

Juergen

Logged


* February 15, 2015, 09:10:35 AM
#1
I just noticed the problem only happens in case V23 is installed.
On another machine with DC21 and DC22 DesignCAD V24 is launched as expected.

May be V23 and V24 have the same GUID?

Juergen
« Last Edit: February 15, 2015, 09:40:30 AM by Juergen »

Logged


February 17, 2015, 08:01:16 AM
#2
Did you try running dcad24 /regserver in an Administrator-elevated command prompt?

To change the current COM settings, DesignCAD needs admin-level access to HKLM. This requires an admin-level command prompt (even if you're running on an Admin account). Thanks Microsoft!

Logged
25 years with DesignCAD


* February 17, 2015, 08:18:46 AM
#3
DT thanks!

Administrator-elevated command prompt are the magic words.  ;D

Kind regards,

Juergen

Logged


* February 21, 2020, 01:44:26 PM
#4
DcApp = GetObject(, "DcadExp25.Application")
If DcApp Is Nothing Then
   DcApp = New DcadExp25.Application
End If

First line seems not to work with DesignCAD 2V ver. 25
If Designcad i allready opened the line DcApp = New DcadExp25.Application seem to activate the open DesignCAD.
After closing the application and running again the line DcApp = New DcadExp25.Application will not activate the open DesignCAD but will open a new one. How can that be solved?

Logged