TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

Programming TurboCAD with Visual Basic
Read 4992 times
* April 24, 2015, 04:33:36 AM
I have been asked to develop an application to automate the generation of CAD drawings using either TurboCad or Autocad. Visual Basic is the necessary choice for a programming language and I have a lot of experience using VBA. I have no experience using Visual Basic via an SDK which I believe is possible with TurboCad. And TurboCad is preferred by the customer over Autocad. In either case I would have to learn enough of either TurboCad or Autocad to perform the programming task. Either would involve a pretty steep learning curve but I do have a lot of drafting experience and have spent a little time with both systems. So I'm willing to tackle it.

Here is what I know (or at least think I know):

1. VBA is built into Autocad.
2. VBA may have been built into TurboCad at one time but is not available in the current version that I would be using
3. TurboCad has an SDK that would allow a Visual Basic development using a standalone version of VB.

What I would like to know is:

A. Are my assumptions correct?
B. Where is the documentation for VB via the SDK?
C. Is it practical to develop an application with TurboCad  + SDK + VB?

Thanks in advance from a forum newbie.


* April 28, 2015, 10:50:00 AM
vba was supported in TC till version 11 (long long ago)
I still miss vba in TC see http://forums.turbocad.com/index.php/topic,16224.0.html
When you want to develop applications with vb you probably choose vb6 cause it is very similar to vba.
>>I have been asked to develop an application ..<<
that sounds to me that you are a professional. So you may know, that applications developed with VB6 are less compatible.
But for me it is still my best choice. I use TC2015-32 bit and vb6. Creating .exe and .dll.
see also http://forums.turbocad.com/index.php/topic,1190.0.html
concerning your post:
1 yes
2 right
3 right
A yes
B In the SDK-folder
C yes with the limitations described above (compatibility)

Additional remark on 1: Autocad skipped vba and urged the users to switch to ?? as a successor. AFAIK that wasn´t successful. So the vba for autocad is still alive. But you have to install it extra

Additional remark on B: when I started vba in TC there was a vivid community in the old-TC-forum. That was very helpful.
one or two more thoughts concerning Programming TC
I stick on vb6 cause I’m used to vb6 and vba for 15 years. Use vba with Excel and Word. And vba with TC8-TC15. Then switched to VB6.
When I solve a problem using program code, then I would wage the time
10 % to bring the problem into program code
20% to eliminate the errors
70% to know and understand the TC Objectmodel.
So it is fairly indifferent which program language you use. The most time-consuming is the TC Objectmodel. This is due the lack of good documentation. And a low programmers forum.
If you have to ponder between Autocad and TC you should put the focus on the Objectmodel. More precisely how is the Objectmodels documentation. And how vivid is the programmers community.

best regrads
Bernd from Germany
« Last Edit: April 28, 2015, 11:27:45 PM by ibruethsch »