TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Some updated SDK Project Files For TC19 x64
Read 7088 times
* June 29, 2012, 04:27:02 PM
The .NET SDK samples that installed with TC19 x64 unfortunately don't work very well without a lot of manual tweaking. I've begun the process of revising them to work correctly with the 64-bit version of TurboCAD.

Attached is a revised set of Visual Studion 2010 projects from the SDK/Samples/DotNet/Base folder. Simply download this file to your 64-bit SDK/Samples/DotNet folder, and unzip the files to a new folder (should default to Base_x64_revised). Then load the new samples from that new folder. Depending on where you installed TurboCAD, you may have permissions issues to deal with if you're not running under an Admin account. I have, I believe, corrected all the relative paths for references and for copying the results to the Program/Draggers or other similar folders, so long as you install them to the default SDK/Samples/DotNet/Base folder. Additionally, some minor coding errors have been corrected.

Note that there may be some display issues with RedSDK; however, all of these revised samples appear to work ok for me with NativeDraw set to GDI.

I'll be reviewing the other 64-bit SDK samples as the summer progresses, and post revised versions as I go.

Logged


* July 01, 2012, 02:42:21 PM
#1
Hi Kevan
many thanks for your sample.
The VBToolSample works fine here - TC19-64-bit.
I have to  copy the VBToolSample.dll manually to the program\dragger - folder. But that is not a problem.
I use the NativeDraw set to GDI.
Now I can start to adapt my old vb6-dll-code to the 64-bit enviroment.

Best regards
Bernd

Logged


* July 02, 2012, 01:59:08 AM
#2
Hi Kevan
i tried to create my own project.
1- using the vbtoolsample as a template. --> no success. 20 errors
2-creating a new project using the existing code. . --> no success. 20 errors
--> I will wait for the x64-samples VB-Net

best regards
Bernd


Logged


* July 02, 2012, 07:01:27 AM
#3
Hi, Bernd, can you attach the source for your modified version?

Is the source folder in the same directory (Samples/DotNEt/Base_x64_Revised) as the revised example? If not, the relative paths to the referenced dlls will be wrong, which will give you a bunch of errors. Remove and re-add the references and see if that helps, and check the Build Events to make sure the relative path for the copy operation is correct.

Also, you might need to provide new guids everywhere you find one in the original source (including the internal command id value) and project settings.
« Last Edit: July 02, 2012, 07:06:12 AM by kchapman »

Logged


* July 02, 2012, 11:09:33 AM
#4
Hi Kevan
thanks for your advise.
I made the mistake:
I used the
SDK/Samples/DotNet/Base folder
instead of
SDK/Samples/DotNEt/Base_x64_Revised

now it work fine.

BTW: I haven´t changed the GUID.: 398A04F7-6393-49AE-AC94-ED2B296D893A
Both sample and sample2 have the same GUID - and it works.
Never thought so.

best regards
Bernd


Logged


* July 02, 2012, 02:12:08 PM
#5
Hi Kevan
I tried to apply my own code - but had no success.

    Public Function Run(ByVal Context As IMSIGX.Tool) As Boolean Implements TCDotNetInterfaces.ITurboCADTool.Run
        System.Windows.Forms.MessageBox.Show("Run My Simple VB tool2")
        Run = True

    End Function

changed to
    Public Function Run(ByVal Context As IMSIGX.Tool) As Boolean Implements TCDotNetInterfaces.ITurboCADTool.Run
        System.Windows.Forms.MessageBox.Show("Run My Simple VB tool2")
        Run = True
        Dim tcapp As New IMSIGX.Application
        Dim actdr As IMSIGX.Drawing
        actdr = tcapp.ActiveDrawing
        MsgBox(actdr.Selection.Count - 1)
        System.Windows.Forms.MessageBox.Show("Run My Simple VB tool2-a")


    End Function
----------------------------------------------------------------------------
referencing IMSIGX19.dll --> 10 error in the debugger
Fehler   1   Class "MyVBTool" muss "Function Initialize(Context As IMSIGX.Tool) As Boolean" für die TCDotNetInterfaces.ITurboCADTool-Schnittstelle implementieren.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   3   16   VBToolSample2
Fehler   2   Class "MyVBTool" muss "Function Run(Context As IMSIGX.Tool) As Boolean" für die TCDotNetInterfaces.ITurboCADTool-Schnittstelle implementieren.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   3   16   VBToolSample2
Fehler   3   Class "MyVBTool" muss "Function UpdateToolStatus(Context As IMSIGX.Tool, ByRef Enabled As Boolean, ByRef Checked As Boolean) As Boolean" für die TCDotNetInterfaces.ITurboCADTool-Schnittstelle implementieren.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   3   16   VBToolSample2
Fehler   4   Class "MyVBTool" muss "Sub Terminate(Context As IMSIGX.Tool)" für die TCDotNetInterfaces.ITurboCADTool-Schnittstelle implementieren.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   3   16   VBToolSample2
Fehler   5   "Tool" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   55   49   VBToolSample2
Fehler   6   "Tool" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   60   42   VBToolSample2
Fehler   7   "Application" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   63   26   VBToolSample2
Fehler   8   "Drawing" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   64   22   VBToolSample2
Fehler   9   "Tool" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   72   43   VBToolSample2
Fehler   10   "Tool" ist im Namespace "IMSIGX" nicht eindeutig.   D:\Program Files\IMSIDesign\TCWP19\SDK\Samples\DotNet\Base_x64_revised\VBToolSample2\VBToolSample2\Class1.vb   76   55   VBToolSample2
------------------------------------------------------------------------------------

not referencing imsigx19.dll -->
System.Windows.Forms.MessageBox.Show("Run My Simple VB tool2")  - work

do not work
        MsgBox(actdr.Selection.Count - 1)
        System.Windows.Forms.MessageBox.Show("Run My Simple VB tool2-a")


--> maybe it is better for me to wait for the VB Net samples X64.

best regards
Bernd

Logged


* July 03, 2012, 12:51:29 PM
#6
I'm not sure what's causing your errors.  If you're using the new managed api (referencing IMSIGXMGD.dll), there should be no need to reference IMSIGX19.dll as well. IMSIGXMGD has "DotNet-ified" versions of almost all the API functions.

This code works ok for me:
Code: [Select]
    Public Function Run(ByVal Context As IMSIGX.Tool) As Boolean Implements TCDotNetInterfaces.ITurboCADTool.Run
        Dim tcapp As IMSIGX.Application
        tcapp = New IMSIGX.Application
        System.Windows.Forms.MessageBox.Show(tcapp.Version.ToString())
        Dim tcdrw As IMSIGX.Drawing
        tcdrw = tcapp.ActiveDrawing
        Dim i As Integer
        i = tcdrw.Selection.Count
        System.Windows.Forms.MessageBox.Show("Selection Count: " + i.ToString())
        MsgBox(i)
        'System.Windows.Forms.MessageBox.Show("Run My Simple VB tool")
        Run = True
    End Function

Note that I did change the CMD_ID guid and the assembly guid so there would be no clashes between the original sample dll and the new one. Also, if you leave the original sample dll in the draggers folder, you'll probably want to change the command name, menu caption, and toolbarname.

Logged


* July 12, 2012, 07:49:20 PM
#7
Are you still unable to get your tool running, Bernd?

Logged


* July 14, 2012, 03:43:23 AM
#8
Hi Kevan
no success here.  It still don´t work.
But I am happy with your other example.
http://forums.turbocad.com/index.php/topic,9564.0.html
Many thanks for that.
bets regrads
Bernd

Logged


* July 15, 2012, 08:35:02 PM
#9
Bernd, if you can post your non-working example (or email to me), I'll try to figure out what the problem might be.

Kevan

Logged


* July 16, 2012, 10:05:04 AM
#10
Hi Kevan
I used your sample.
But that didn´t work here on my system.

no other vbtool is in dragger
in TC i have selected some items
stating this tool : It happens nothing.

best regards
Bernd

Logged


March 27, 2014, 12:56:04 PM
#11
Install Visual Studio 2010 Express from the ISO image, burn it or make a USB image, then install the SDK and SP1 patches
 
Windows SDK 7.1. Note that, as of 16.3.2012, if you use this SDK with Visual Studio 2010, installing the SDK requires installing the following packages in this order (see readme.html provided with the service pack):
   1. Install Visual Studio 2010  VS2010Express1.iso                      This is VS C++, C#, VB
   2. Install Windows SDK 7.1  winsdk_web.exe
   3. Install Visual Studio 2010 SP1  VS10sp1-KB983509.exe
   4. Install Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1 VC-Compiler-KB2519277.exe
   5. Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) vcredist_x64.exe  just copy
   6. Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) vcredist_x86.exe  just copy
   7. ISO to USB http://www.isotousb.com/   isotousb_setup.exe  use this to make the USB stick if your cheap
http://jaga.us/vs2010.zip  all the above files in one zip, the SP1 update downloads what you need
This gets the compilers and SDK to begin programming.
« Last Edit: March 27, 2014, 05:36:48 PM by kangus »

Logged
TurboCad V12~V2x Platinum Pro Edition + CAM Plug-In +  Surface Modeling + Survey Coordinates RedSDK
Windows 10 Pro Anniversary Editions 1703 OSB 15063.296
x64 I7 12GB NVIDIA Quadro

Hobby User