News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

CLSID DCAD15 DCAD18

Started by DAvidcfres, February 02, 2010, 06:35:15 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

DAvidcfres

Hi,

I use 2 frenchs versions of DesignCad.

I got a problem with  the CLSID of DesignCAD.Application.15 and DesignCAD.Application.18...
There are eguals  ??? :

CLSIDFromProgID('DesignCAD.Application.15') = CLSIDFromProgID('DesignCAD.Application.18') =
{C342DA76-F80F-40EC-9851-E3683E27CB17}


Is someone could tell me what are the CLSID of US versions ?

HKEY_CLASSES_ROOT\DesignCAD.Application.15\CLSID
HKEY_CLASSES_ROOT\DesignCAD.Application.18\CLSID



Thanks .

David.






DrollTroll

They are the same as the French versions. We have used the same CLSID for the last several versions of DesignCAD, going back at least as far as V15.
25 years with DesignCAD

DAvidcfres

#2
Thanks Droll,

then i got an important problem :

To create an Ole Object i use

CreateOleObject('DesignCAD.Application.15') as IDcadApp
or
CreateOleObject('DesignCAD.Application.18') as IDcadApp


CreateOleObject use CoCreateInstance (http://msdn.microsoft.com/en-us/library/ms686615(VS.85).aspx)
and CoCreateInstance needs the CLSID of the object.

To get the CLSID, i use CLSIDFromProgID   (http://msdn.microsoft.com/en-us/library/ms688386(VS.85).aspx)  
but
CLSIDFromProgID('DesignCAD.Application.15', Result) and CLSIDFromProgID('DesignCAD.Application.18', Result)
return '{C342DA76-F80F-40EC-9851-E3683E27CB17}'

....

then, my question is :

How can i create an OleObject for DCAD15 on a computer who has both versions 15 & 18 ?

David





DrollTroll

#3
If present on the system,

HKEY_CLASSES_ROOT\DesignCAD.DCD-Document.15\shell\open\command

will give the path to the DesignCAD 15 exe file. With that information, you can use CreateProcess or ShellExecute to launch that version.

Or create a DesignCAD 15 document, then obtain the Application object from the document.
Something like

DcDoc := CreateOleObject('DesignCAD.DCD-Document.15') as IDcadDoc;
DcApp := DcDoc.Application;


Sorry, that last bit won't work -- same problem.
25 years with DesignCAD