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.

DesignCAD Type Library Version

Started by Juergen, August 22, 2014, 12:50:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Juergen

I guess you have to specify the concrete library version to include within Visual Basic (2010 Express)
and it seems to be not that easy to build a VB OLE Automation over DC V20 - 23 (24), right?

Is there a late binding possible? My latest idea is to do a version for DC 20, DC 21, DC22 and DC 23
with a kind of chain calling - if DC 20 fails, call new .exe with DC 21 and so on. Is this a solution
someone has tested? Do I have to install all DC Versions (for development)  to do so?

Thanks for any help,

Juergen

DrollTroll

I believe, if you reference the oldest TLB that you want to cover, then in your code you can just use "DesignCAD.Application", rather than "DesignCAD.Application.nn". Your application should then bind at runtime to whichever version of DesignCAD is registered as the current one.

However, I confess I haven't had much time to work with OLE Automation for a few years, so that may not work as I intend.

Also: I'd suggest you make version 21 your earliest supported version, if you need your application to start DesignCAD when its not running. With previous versions, a bunch of extra marshaling code was necessary to start a new instance of DesignCAD (though connecting to an open instance was standard GetObject stuff).
25 years with DesignCAD

Juergen

Thank for the advice. I was not aware, that I can bind V21 library to use in V22 and V23.
I'll give it a try - I don't have V21 and 23 - I hope I find trial versions. It is no problem
to install all three versions at the same time?

Kind regards,

Juergen

DrollTroll

No, all three versions will work side by side just fine -- different folders, default setting, and everything. However, the last one you installed (OR the last one you manually registered on the command line using "Dcadnn /regserver" will be the default "DesignCAD.Application" that OLE Automation sees.
25 years with DesignCAD

Dr PR

Juergen,

DesignCAD gives you the option of installing "for all users" or "for just me."

The "just me" option allows you to put the program anywhere. This allows you to install multiple independent versions and have them all run OK. For example, I have 15 different versions (including beta versions) running on my main work computer, dating back to V15.3.

I install the programs in this folder structure:

C:\DesignCAD VNN.N\Program

Any other files associated with the particular version go into the C:\DesignCAD VNN.N folder. This includes the original .ZIP files, test drawing files, etc.

For files common to all programs I use this folder:

C:\DesignCAD

This is where I put custom keyboard, toolbox, materials and other files. Macros go into:

C:\DesignCAD\macros

All 15 versions use these common files without interfering with each other.

Phil
DesignCAD user since 1987

Juergen

Phil,

Thank you for the valuable information you provided.

Kind regards,

Juergen