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.

Visual C# 2010 Toolbar sample for TC19
Read 3301 times
* July 12, 2012, 08:11:12 PM
This Visual Studio 2010 C# project creates a menu entry (Tools/Dot Net Tools/MultAdd Tool CS) and a single-tool toolbar. The tool adds two or more solids together, and has an Undo option. It was designed to work in TurboCAD 19, and may not work under earlier versions.

The project is currently configured to build a 64-bit dll for the 64-bit version of TurboCAD 19. If you want a 32-bit version, change the Build Configuration to x86 or AnyCPU.

The project was created in a sub-folder of the SDK/Samples/DotNet/Base folder; I suggest you copy the zip file to that folder, then use the "extract here" feature of 7-zip or Winzip, or Windows 7's "Extract All" context command, to generate the appropriate file structure. If set up correctly, after Visual Studio compiles the dll it should automatically copy the resulting dll to your Program/Draggers folder.

"I get a bunch of reference errors when I try to compile."
The paths to the IMSIGXMGD and TCDotNetInterfaces references are relative paths. If you don't have the project in the correct folder, it won't be able to locate those dlls. In this case, simply remove those references and re-add them using the "Browse" tab of the Add Reference dialog. They should be located in your TurboCAD 19 installation's Program folder.

"I get a 'failed copy' error message when it compiles."
Again, the path is wrong, and the post-build step can't locate your Program/Draggers folder. Either fix the destination path, or delete the Post-Build custom step and manually copy the dll to Program/Draggers.

"The dll compiles and copies to Program/Draggers, but I don't see the toolbar or the menu entry".
Verify that your are building for the correct target -- you MUST set it to x64 for a 64-bit version of TurboCAD; for a 32-bit version, you can set it for x86 or AnyCPU. Also, be sure that you have referenced the proper versions of IMSIGXMGD and TCDotNetInterfaces; if you have both 32-and 64-bit versions of TurboCAD installed, it's not difficult to accidentally reference the wrong set of dlls for the selected build target.