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 17 and C++

Started by Zarathustra, November 07, 2010, 02:57:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zarathustra

Dear DesignCad Users,

at first, please sorry about my mad English...

I am trying to use DesignCAD 17 with C++, but not with Microsoft C++ Express Edition. I would like to use CodeBlocks IDE and MinGW Compiler.

But the first Problem is the import of the Typelibrary "Dcad17.tlb".

If  i used "tlibimp.exe -c+ Dcad17.tlb"  - i found tlibimp.exe at the borland 5.5 binary directory - i got Headers for C++. But this Headers #include vcl.h and utilcls.h, so i did not found on my system.

Is it possible to use OpenSource C++ to write macro on DesignCAD?

I worked with Delphi 7 Personal Edition and it works fine. After that i tried to transform my Project to Lazarus, but Lazarus did not like ActiveX...

Is anyone using Lazarus to write macro?

May I can use C# or Visual Basic 2008 Express Edition. I tested both with the Torus macro in Developers Guide. The .Net Languages are not so fast as Delphi's binary code. Delphi needs 1,8 s for building, c# and vb 2,8 s.

But it is not the time why i want to use c++.
I thought i could learn c++ and write macros. Two fly with one fly flap   :)

Greetings from Giessen, Germany

Zarathustra

DrollTroll

Hi Zarathustra,

I haven't come down from the mountain yet, so I'm afraid I can't offer much help in MinGW. It's all I can do to (sort of) keep up with Microsoft and Embarcadero (formerly Borland/CodeGear) compilers.

It's not surprising that you got a bunch of VCL dependencies using tlibimp -- the COM code in the Delphi/C++ Builder environment relies on VCL implementations of certain structures such as Variants and other COM structures.

I did a quick Google for "MinGW COM", and didn't find any useful links. I know there is at least one developer who has used Lazarus to create utilities for TurboCAD, but I don't know of any who have done so with DesignCAD.

DesignCAD will work (mostly) with .NET, but you may run into some odd problems here and there. One problem is that DesignCAD won't start with .NET using the new operator (C# ex. dcApp = new DesignCAD.Application;). You have to marshal a pointer  an already-running instance.

Regards,

DT
25 years with DesignCAD

Zarathustra

Hi DT,

thank you for your answers.

My macro did not need to start DesignCAD. Only access to an existing session is necessary.

Is anyone here who tried to develop macro with java?

Regards

Zarathustra