<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Printing Settings in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/9998098#M29121</link>
    <description>&lt;P&gt;Hi&amp;nbsp;all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use this code below, my printing is not producing any different output, even if I make changes to zoom, colour etc. Is there something I am missing or not setting properly?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    [Transaction(TransactionMode.Manual)]
    public class PrintSettingsCommand : IExternalCommand
        {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
            {
            Document OpenDoc = App.CurrentDocument;
            PrintManager printManager = OpenDoc.PrintManager;

            printManager.PrintSetup.CurrentPrintSetting = printManager.PrintSetup.InSession;
            printManager.SelectNewPrintDriver(App.BASPalette.cboPrinter.SelectedItem as string);
            printManager.PrintToFile = true;
            printManager.PrintRange = PrintRange.Select;
            printManager.PrintToFileName = string.Format(@"C:\PDF\{0}.pdf", OpenDoc.ProjectInformation.Name);

            IPrintSetting printSettings = printManager.PrintSetup.CurrentPrintSetting;
            ViewSheetSetting viewSheetSetting = printManager.ViewSheetSetting;
            ViewSet viewSet = new ViewSet();

            for (int i = 0; i &amp;lt; App.BASPalette.lvwSheets.SelectedItems.Count; i++)
                {
                WSPSheet sheet = App.BASPalette.lvwSheets.SelectedItems[i] as WSPSheet;
                if (sheet != null)
                    {
                    if (sheet.View.CanBePrinted)
                        {
                        viewSet.Insert(sheet.View);
                        }
                    }
                }

            printSettings.PrintParameters.PageOrientation = PageOrientationType.Landscape;
            printSettings.PrintParameters.PaperSize = App.BASPalette.cboPaperSize.SelectedItem as PaperSize;
            printSettings.PrintParameters.ZoomType = ZoomType.Zoom;
            printSettings.PrintParameters.Zoom = 100;
            printSettings.PrintParameters.ColorDepth = ColorDepthType.GrayScale;

            using (Transaction transaction = new Transaction(OpenDoc))
                {
                transaction.Start("Set in-session views");
                viewSheetSetting.InSession.Views = viewSet;
                transaction.Commit();
                }

            printManager.PrintSetup.CurrentPrintSetting = printSettings;

            printManager.CombinedFile = true;
            printManager.Apply();
            OpenDoc.Print(viewSet, true);


            return Result.Succeeded;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2021 10:25:29 GMT</pubDate>
    <dc:creator>BrentBurgess1980</dc:creator>
    <dc:date>2021-01-13T10:25:29Z</dc:date>
    <item>
      <title>Printing Settings</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/9998098#M29121</link>
      <description>&lt;P&gt;Hi&amp;nbsp;all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use this code below, my printing is not producing any different output, even if I make changes to zoom, colour etc. Is there something I am missing or not setting properly?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;    [Transaction(TransactionMode.Manual)]
    public class PrintSettingsCommand : IExternalCommand
        {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
            {
            Document OpenDoc = App.CurrentDocument;
            PrintManager printManager = OpenDoc.PrintManager;

            printManager.PrintSetup.CurrentPrintSetting = printManager.PrintSetup.InSession;
            printManager.SelectNewPrintDriver(App.BASPalette.cboPrinter.SelectedItem as string);
            printManager.PrintToFile = true;
            printManager.PrintRange = PrintRange.Select;
            printManager.PrintToFileName = string.Format(@"C:\PDF\{0}.pdf", OpenDoc.ProjectInformation.Name);

            IPrintSetting printSettings = printManager.PrintSetup.CurrentPrintSetting;
            ViewSheetSetting viewSheetSetting = printManager.ViewSheetSetting;
            ViewSet viewSet = new ViewSet();

            for (int i = 0; i &amp;lt; App.BASPalette.lvwSheets.SelectedItems.Count; i++)
                {
                WSPSheet sheet = App.BASPalette.lvwSheets.SelectedItems[i] as WSPSheet;
                if (sheet != null)
                    {
                    if (sheet.View.CanBePrinted)
                        {
                        viewSet.Insert(sheet.View);
                        }
                    }
                }

            printSettings.PrintParameters.PageOrientation = PageOrientationType.Landscape;
            printSettings.PrintParameters.PaperSize = App.BASPalette.cboPaperSize.SelectedItem as PaperSize;
            printSettings.PrintParameters.ZoomType = ZoomType.Zoom;
            printSettings.PrintParameters.Zoom = 100;
            printSettings.PrintParameters.ColorDepth = ColorDepthType.GrayScale;

            using (Transaction transaction = new Transaction(OpenDoc))
                {
                transaction.Start("Set in-session views");
                viewSheetSetting.InSession.Views = viewSet;
                transaction.Commit();
                }

            printManager.PrintSetup.CurrentPrintSetting = printSettings;

            printManager.CombinedFile = true;
            printManager.Apply();
            OpenDoc.Print(viewSet, true);


            return Result.Succeeded;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 10:25:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/9998098#M29121</guid>
      <dc:creator>BrentBurgess1980</dc:creator>
      <dc:date>2021-01-13T10:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Settings</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/9998640#M29122</link>
      <description>&lt;P&gt;Have you searched this forum for existing answers before raising your question?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an issue that was successfully resolved that sounds pretty similar to yours:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/viewsheet-set-to-be-printed-setting-problem/m-p/8823129" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/viewsheet-set-to-be-printed-setting-problem/m-p/8823129&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 14:45:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/9998640#M29122</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2021-01-13T14:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Settings</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10000024#M29123</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did search, but probably searched the wrong things&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/print-manager-papresize-paper-orientation/td-p/5928984" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/print-manager-papresize-paper-orientation/td-p/5928984&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/printing-set/m-p/5875862#M12381" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/printing-set/m-p/5875862#M12381&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll take a look at that post you linked.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 01:08:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10000024#M29123</guid>
      <dc:creator>BrentBurgess1980</dc:creator>
      <dc:date>2021-01-14T01:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Settings</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10006257#M29124</link>
      <description>&lt;P&gt;I managed to take the viewprinter from the SDK and modify to suit my requirements.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 14:18:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10006257#M29124</guid>
      <dc:creator>BrentBurgess1980</dc:creator>
      <dc:date>2021-01-16T14:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Settings</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10171930#M29125</link>
      <description>&lt;P&gt;What was the solution?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 06:56:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/printing-settings/m-p/10171930#M29125</guid>
      <dc:creator>luis7SJJ3</dc:creator>
      <dc:date>2021-03-20T06:56:41Z</dc:date>
    </item>
  </channel>
</rss>

