API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

DrawingHandlerPrintDrawing Method (Drawing, DPMPrinterAttributes, String)

Prints the drawing to file using the given printer attributes and name of the output file. The given output file overrides the printer attributes file settings.

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2021.0.0
public bool PrintDrawing(
	Drawing drawing,
	DPMPrinterAttributes printAttributes,
	string outputFile


Type: Tekla.Structures.DrawingDrawing
The drawing to be printed.
Type: Tekla.Structures.DrawingDPMPrinterAttributes
The print attributes for the print job.
Type: SystemString
The print output file name.

Return Value

Type: Boolean
True on success, false if printing fails.
Exception Condition
ArgumentException Thrown if PDF printing selected, but no file name provided.
ArgumentNullException Thrown if drawing or printerAttributes is null.
If there is an active drawing visible in the drawing editor and it is a different drawing to the specified drawing, the active drawing will be closed.
See Also