TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

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

How to print a drawing using SDK?
Read 4446 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.



* June 14, 2012, 01:31:09 AM
I haven´t used printing via SDK.
But I found something in the old sdk.chm:
Printing Macro Example
This example shows TODO.
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