Application: ViewPrinter
Revit Platform: All
Revit Version: 2011.0
First Released For: 2008.0
Programming Language: C#
Skill Level: Medium
Category: Data Exchange
Type: ExternalCommand

Subject: Print the printable views.
Summary: 
This sample demonstrates how to print the printable view and sheets.

Classes:
Autodesk.Revit.DB.Document.PrintManager
Autodesk.Revit.DB.VirtualPrinterType
Autodesk.Revit.DB.PrintRange
Autodesk.Revit.DB.PrintSetup
Autodesk.Revit.DB.PrintSetting
Autodesk.Revit.DB.ViewSheetSetting
Autodesk.Revit.DB.ViewSheetSet

Project Files: 
Command.cs
This is the main DLL source file; it contains the class Command which implements interface IExternalCommand.
PrintMgr.cs
Exposes the print interfaces just like the Print Dialog (File->Print …) in UI.
PrintSTP.cs
Change and save printer setup setting, exposes the print parameters just like the Print Setup Dialog (File->Print Setup…) in UI such as Printer name, paper, zoom, options, etc.
ViewSheets.cs
Exposes the View/Sheet Set interfaces just like the View/Sheet Set Dialog (File->Print …; selected views/sheets->Select…) in UI.

Description: This sample demonstrates the following functionalities:
-	Print the printable views and sheets.
-	Change print setting.

Instructions: 
Assumption: Available printer(s) is installed.
1.	Run this command.
2.	In the Print dialog box, select a printer for Name.
3.	If desired, select print to file. You can save the print job as either a PRN or a PLT file. 
4.	Under Print range, specify if you are printing the Current window, a visible portion of the current window, or Selected views/sheets. If you are printing selected views/sheets, click Select, choose from the list of available views to print, and click OK.
5.	Under Options, specify the number of copies to print and whether to print a view or sheet set in reverse order. You can select Reverse print order for a multiple-page print job so that the last page is printed first. 
6.	To print a complete copy of the project before the first page of the next copy is printed, select Collate. To print all copies of the first page and then print all copies of each subsequent page, clear Collate.
7.	Under Settings, click Setup to change print settings.
8.	When you are ready to print, click OK.