/// <summary>
 /// Handler method for DocumentPrinting event.
 /// This method will dump printer name, views to be printed and user name, etc.
 /// Besides, this handler will reserve the start time of whole print process.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void AppDocumentPrinting(object sender, Autodesk.Revit.DB.Events.DocumentPrintingEventArgs e)
 {
     // ensure log files are specified and dump header information
     SetupLogFiles();
     //
     // Dump environment of print: user name, printer name and project title.
     DumpPrintEnv(System.Environment.UserName, e.Document.PrintManager.PrinterName, e.Document.Title);
     //
     // Start new watch for DocumentPrint
     Trace.WriteLine(System.Environment.NewLine + "Document Print Start: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
     StartNewWatch(e.Document, false);
     //
     // Dump the events arguments
     DumpEventArguments(e);
 }
Exemple #2
0
 void doc_DocumentPrinting(object sender, Autodesk.Revit.DB.Events.DocumentPrintingEventArgs e)
 {
     DisplayEvent("Document printing");
 }