TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Remember to do a search before you ask a question!!!

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