TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

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

Need help accesing CAM settings from Visual Basic
Read 4199 times
* May 23, 2013, 05:54:08 PM
Hi, I hope somebody can give me a push in the right direction. I am accessing the TurboCad object model (or programmable objects) from Visual Basic. I was able to get some info from the old www3.turbocommunity.com forum and now I can draw in Turbocad via code.

But I have not been able to find how to access the cam settings from Visual Basic (I have the cam plug-in). I have added some references that appear available but I don't know how to use them and the first one I need (set cam part) I don't even see.

I would appreciate any help you can give me. Thanks so much. Miguel

My version is 14.2.


May 30, 2013, 01:44:02 PM
I have never tried. What version of visual basic are you using?

TurboCAD user since v3
 TurboCAD on flickr || My twitter ||

* May 30, 2013, 05:52:10 PM
I am using visual basic 2008 from visual studio tool 2008 express.

I am making slow progress and right now I believe I have found where the cam part settings such as width, lenght, thickness & material of the part to mill are saved. It looks like they are stored in item(0) of the graphics collection of the drawing.

Any help would be appreciated. Thanks. Miguel


June 01, 2013, 01:18:01 PM
what are you trying to accomplish. Are you writing an addon to the plug in?

TurboCAD user since v3
 TurboCAD on flickr || My twitter ||

* June 01, 2013, 07:24:27 PM
Not really. I manufacture low-priced parts. They are repetitive. But still they differ slightly in positions, depths, widths, etc. from one to the other.

It is not efficient to go through the process of drawing the part, establishing all the settings, indicating the external and internal contours, tools, etc. manually. Specially since I am able to predict or calculate before hand what I need. I want to do that as quickly as possible.

So I want to programatically via a windows form application (Visual Basic express 2008) feed the information and then with a few coded subroutines do everything else. That means that I will draw the objects, set the cam part information, set the tools, choose and execute the machining procedure and its variables and contours, create the G code and save it to a txt file and then also manipulate the G code a little to make it work in my very simple mill, etc. with code.

That means that I need to set properties, add graphics, use methods to have TCAD generate automatically the tool paths and then the G code all programatically.

I know it seems a huge effort but from what I have seen so far it does appear that all of this is available through the TCAD object model and also through some other libraries that come with the CAM plug-in software.

It will be kind of a specialized program so I can only use it for myself, so no, even if I turn it in the end in an add-on it would only work for my own purpose.

I guess this I am trying has been done a million times in the industry with several pieces of software. I have TCAD and its plug-in and they work great so I just want to automate my process to be productive and of course in the end be able to sell a little more.

Have you seen anything like this been done by somebody else before? Do you happen to have any literature on how to use the libraries for this? That is where I am having a hard time.

Thanks for your help. Miguel.