TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software’s can be used with TurboCAD.


How to print a drawing using SDK?
Read 2795 times
* June 13, 2012, 11:25:57 PM

Does any one know how to print a drawing using Turbo CAD 19 Sdk? I am using .NET SDK for my program.
I need to print drawings from my program. And I could not find any sdk method to print.


Thanks in advance.

Regards

Logged


* June 14, 2012, 01:31:09 AM
#1
I haven´t used printing via SDK.
But I found something in the old sdk.chm:
------------------------------------------
Printing Macro Example
Description
This example shows TODO.
Components
Printing.zip (Web link) Project archive.
----------------------------------------
that means it will be possible, but I do not found the Printing.zip . I assume that  was a vba-macro

But I found a VB6.vbp
(add as sampleprint.zip)
there is included:

Private Sub Print1_Click()
    Dim PrintServer As PrintDr
    Dim objDr As Object
    Set PrintServer = New PrintDr
    If (Printers.Count = 0) Then
        MsgBox "There is not printer(s) defined"
        Exit Sub
    End If
    Set objDr = Dr
    Set Printer = Printers(1) ' choose a default printer
    PrintServer.PrintAll Dr, Printer.hDC
End Sub


I hope that helps.
best regards

Bernd

Logged