News:

When replying to a specific statement be sure to quote the previous post.

Main Menu

SDK and TC Deluxe

Started by Colin Edgar, May 28, 2024, 01:24:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Colin Edgar

I might be venturing down a rabbit hole but I'm interested in learning to use the SDK with TC Deluxe 2021 for exchanging data between TC and Microsoft Excel. I'm not sure if this is even possible, or which programming language to use. The SDK documentation that came with TC is really old and not very new-user friendly. From what I can gather, Ruby is not available with Deluxe, and VBA is no longer supported by TC. I've also read that VBScript will soon be deprecated by Microsoft. What would be the best option for Deluxe users? Also, does anyone have an example routine for TC/Excel data exchange that they would be willing to share?

Thanks
TurboCAD Deluxe 2021 (64-bit, ver. 28, build 50); Windows 11 Home; Lenovo Legion 7, Intel Core Ultra 9 275HX, 2.70GHz, 24 cores, 32GB RAM, NVIDIA GeForce RTX 5070

nikkipollard

Unfortunately the SDK is a platinum feature.
But if you have platinum it is easy to program Turbocad through Excel.
If you are familiar with VBA or VBscript then VB.Net is a good option because they are very similar.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Andy H

Quote from: nikkipollard on May 28, 2024, 10:20:51 PMUnfortunately the SDK is a platinum feature.

Whilst the SDK is indeed a platinum feature Nikki.  It is also included in some deluxe versions, and can be controlled via Excel.  In some older deluxe versions the SDK docs folder, and consequently IMSIGX etc may be missing preventing its use. But the SDK folder for the Docs  and 'include' (IMSIGX etc.) is present in my v2019 deluxe and 2022 deluxe.

Colin Edgar

Thanks Nikki and Andy. My 2021 Deluxe installation includes an SDK folder with the Docs, Include, and Samples subfolders. And the 2021 user manual says that the SDK is available in all TurboCAD variants. So it seems like it should work with Deluxe. I have some experience with VBA so I will look into VB.Net. I wasn't sure where to start or if it was even worth pursuing, but now I'm curious if I can get my idea to work!
Thanks again.
TurboCAD Deluxe 2021 (64-bit, ver. 28, build 50); Windows 11 Home; Lenovo Legion 7, Intel Core Ultra 9 275HX, 2.70GHz, 24 cores, 32GB RAM, NVIDIA GeForce RTX 5070

nikkipollard

#4
If you are familiar with VBA - then your initial idea of using excel might be a quicker way to learn.

The project would reference IMSIGX28.dll (name depends on the version you are using)

To connect to Turbocad and the active drawing
You need code similar to this

 Dim TCApp As IMSIGX.Application
 Dim TCDraw As IMSIGX.Drawing
 Set TCApp = IMSIGX.Application

   TCApp.Visible = True
        If TCApp.Drawings.count > 0 Then
            Set TCdraw = TCApp.ActiveDrawing
        Else
            Set TCdraw = TCApp.Drawings.add("")
        End If

If you want to add graphics to the active drawing
Dim GRS as IMSIGX.Graphics
Set GRS = TCdraw.Graphics
Dim gfx as IMSIGX.Graphic
Set gfx = GRS.AddLineRectangle(0,0,0,20,20,0)

You will notice that as soon as you type the dot after GRS a list of available Functions for adding Graphics to the list of graphics in the drawing is available.

If you want to edit an existing graphic you can access the Graphics in the active Selection.

Dim gSel as IMSIGX.Selection
Set gSel = TCdraw.Selection
Set gfx = gSel(0)

Move, rotate scale etc using the Functions for a Graphic Object

gfx.MoveRelative 50,0,0


 






Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Colin Edgar

Thank you very much, Nikki. This is very helpful. It would have taken me a long time to get this far!
TurboCAD Deluxe 2021 (64-bit, ver. 28, build 50); Windows 11 Home; Lenovo Legion 7, Intel Core Ultra 9 275HX, 2.70GHz, 24 cores, 32GB RAM, NVIDIA GeForce RTX 5070