<?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 Re: Drawing Sheet Automation in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13299933#M1184</link>
    <description>&lt;P&gt;Interesting, I will to looking into this further.&amp;nbsp; Would there be a way of running several scripts concurrently (ie multi threading) to speed up the process for very large drawing sets.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 20:49:28 GMT</pubDate>
    <dc:creator>sales7NF7D</dc:creator>
    <dc:date>2025-02-04T20:49:28Z</dc:date>
    <item>
      <title>Drawing Sheet Automation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13294927#M1182</link>
      <description>&lt;P&gt;I have been searching online seeking tutorials or videos demonstrating how Revit can automate multiple drawings from the model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was expecting to find many examples of innovative scripts or macros that would demonstrate these processes, however I cannot find any evidence to indicate this is possible with Revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anybody has found a video demonstrating drawing automation or know whether this is simply not currently possible, at least I can put this topic to rest.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2025 01:58:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13294927#M1182</guid>
      <dc:creator>Flies-Eyes</dc:creator>
      <dc:date>2025-02-02T01:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Sheet Automation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13296086#M1183</link>
      <description>&lt;DIV id="model-response-message-contentr_1744cadcc68a9a80" class="markdown markdown-main-panel stronger" dir="ltr"&gt;
&lt;P data-sourcepos="1:1-1:296"&gt;Automating drawing creation in Revit is definitely possible and a powerful way to boost productivity. It involves a combination of techniques, from simple scripting to more advanced add-in development. Let's explore the options and I'll point you to resources that demonstrate these techniques.&lt;/P&gt;
&lt;P data-sourcepos="3:1-3:50"&gt;&lt;STRONG&gt;Methods for Drawing Sheet Automation in Revit:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL data-sourcepos="5:1-10:0"&gt;
&lt;LI data-sourcepos="5:1-6:0"&gt;
&lt;P data-sourcepos="5:4-5:280"&gt;&lt;STRONG&gt;Revit API (Add-in Development):&lt;/STRONG&gt; This is the most flexible and powerful approach. Using the Revit API (C# or Python), you can programmatically create views, place them on sheets, set parameters, and even control annotations. This is ideal for complex, customized workflows.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-sourcepos="7:1-8:0"&gt;
&lt;P data-sourcepos="7:4-7:270"&gt;&lt;STRONG&gt;Dynamo:&lt;/STRONG&gt; Dynamo is a visual programming tool that integrates with Revit. It allows you to create scripts (graphs) to automate tasks, including drawing creation. Dynamo is great for less complex automations where you don't want to dive into full add-in development.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-sourcepos="9:1-10:0"&gt;
&lt;P data-sourcepos="9:4-9:240"&gt;&lt;STRONG&gt;Built-in Revit Features (Less Automated):&lt;/STRONG&gt; Revit itself has some features that assist in drawing creation, like view templates and the ability to duplicate views. While not fully automated, these can streamline parts of the process.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-sourcepos="11:1-11:38"&gt;&lt;STRONG&gt;Example Scenario (Revit API - C#):&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-sourcepos="13:1-13:180"&gt;Let's outline a simplified C# example using the Revit API to create sheets and place views on them. This is a basic illustration, but it can be extended for more complex scenarios.&lt;/P&gt;
&lt;DIV class="code-block ng-tns-c928644770-26 ng-trigger ng-trigger-codeBlockRevealAnimation"&gt;
&lt;DIV class="code-block-decoration header-formatted gds-title-s ng-tns-c928644770-26 ng-star-inserted"&gt;&lt;SPAN class="ng-tns-c928644770-26"&gt;C#&lt;/SPAN&gt;
&lt;DIV class="buttons ng-tns-c928644770-26 ng-star-inserted"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="formatted-code-block-internal-container ng-tns-c928644770-26"&gt;
&lt;DIV class="animated-opacity ng-tns-c928644770-26"&gt;
&lt;PRE class="ng-tns-c928644770-26"&gt;&lt;CODE class="code-container formatted ng-tns-c928644770-26" role="text" data-test-id="code-content" data-sourcepos="15:1-73:0"&gt;&lt;SPAN class="hljs-keyword"&gt;using&lt;/SPAN&gt; Autodesk.Revit.DB;
&lt;SPAN class="hljs-keyword"&gt;using&lt;/SPAN&gt; Autodesk.Revit.UI;
&lt;SPAN class="hljs-keyword"&gt;using&lt;/SPAN&gt; System.Collections.Generic;
&lt;SPAN class="hljs-keyword"&gt;using&lt;/SPAN&gt; System.Linq;

&lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;class&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;CreateDrawings&lt;/SPAN&gt;
{
    &lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;&lt;SPAN class="citation-0"&gt;Execute&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="citation-0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="hljs-params"&gt;&lt;SPAN class="citation-0"&gt;ExternalCommandData commandData, &lt;/SPAN&gt;&lt;SPAN class="hljs-keyword"&gt;&lt;SPAN class="citation-0"&gt;ref&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;&lt;SPAN class="citation-0"&gt;string&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="citation-0"&gt; message, ElementSet elements&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="citation-0"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="citation-0 citation-end-0"&gt;
    {
        Document doc = commandData.Application.ActiveUIDocument.Document;&lt;/SPAN&gt;

        &lt;SPAN class="hljs-comment"&gt;// 1. Get or create a Title Block family&lt;/SPAN&gt;
        FamilySymbol titleBlock = GetTitleBlock(doc, &lt;SPAN class="hljs-string"&gt;"YourTitleBlockName"&lt;/SPAN&gt;); &lt;SPAN class="hljs-comment"&gt;// Replace with your title block name&lt;/SPAN&gt;

        &lt;SPAN class="hljs-comment"&gt;// 2. Define view information (e.g., view names, view types, levels)&lt;/SPAN&gt;
        List&amp;lt;ViewInfo&amp;gt; viewInfos = GetViewInformation(); &lt;SPAN class="hljs-comment"&gt;// Function to define your views&lt;/SPAN&gt;

        &lt;SPAN class="hljs-comment"&gt;// 3. Create sheets and place views&lt;/SPAN&gt;
        &lt;SPAN class="hljs-keyword"&gt;using&lt;/SPAN&gt; (Transaction t = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; Transaction(doc, &lt;SPAN class="hljs-string"&gt;"Create Drawings"&lt;/SPAN&gt;))
        {
            t.Start();

            &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt; (ViewInfo viewInfo &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; viewInfos)
            {
                &lt;SPAN class="hljs-comment"&gt;// Create a new sheet&lt;/SPAN&gt;
                ViewSheet newSheet = ViewSheet.Create(doc, titleBlock.Id);
                newSheet.Name = viewInfo.SheetName;
                newSheet.SheetNumber = viewInfo.SheetNumber;

                &lt;SPAN class="hljs-comment"&gt;// Get the view to place (assuming it exists)&lt;/SPAN&gt;
                View viewToPlace = doc.GetElement(viewInfo.ViewId) &lt;SPAN class="hljs-keyword"&gt;as&lt;/SPAN&gt; View;

                &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (viewToPlace != &lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt;)
                {
                    &lt;SPAN class="hljs-comment"&gt;// Place the view on the sheet (adjust location as needed)&lt;/SPAN&gt;
                    XYZ viewLocation = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; XYZ(&lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;, &lt;SPAN class="hljs-number"&gt;2&lt;/SPAN&gt;, &lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;); &lt;SPAN class="hljs-comment"&gt;// Example location&lt;/SPAN&gt;
                    Viewport.Create(doc, newSheet.Id, viewToPlace.Id, viewLocation);
                }
            }

            t.Commit();
        }
    }

    &lt;SPAN class="hljs-comment"&gt;// Helper functions (implementation omitted for brevity - you'll need to define these)&lt;/SPAN&gt;
    &lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;private&lt;/SPAN&gt; FamilySymbol &lt;SPAN class="hljs-title"&gt;GetTitleBlock&lt;/SPAN&gt;(&lt;SPAN class="hljs-params"&gt;Document doc, &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt; titleBlockName&lt;/SPAN&gt;)&lt;/SPAN&gt; { &lt;SPAN class="hljs-comment"&gt;/* ... */&lt;/SPAN&gt; }
    &lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;private&lt;/SPAN&gt; List&amp;lt;ViewInfo&amp;gt; &lt;SPAN class="hljs-title"&gt;GetViewInformation&lt;/SPAN&gt;()&lt;/SPAN&gt; { &lt;SPAN class="hljs-comment"&gt;/* ... */&lt;/SPAN&gt; }

    &lt;SPAN class="hljs-comment"&gt;// Inner class to hold view information&lt;/SPAN&gt;
    &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;class&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;ViewInfo&lt;/SPAN&gt;
    {
        &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt; SheetName { &lt;SPAN class="hljs-keyword"&gt;get&lt;/SPAN&gt;; &lt;SPAN class="hljs-keyword"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; &lt;SPAN class="hljs-built_in"&gt;string&lt;/SPAN&gt; SheetNumber { &lt;SPAN class="hljs-keyword"&gt;get&lt;/SPAN&gt;; &lt;SPAN class="hljs-keyword"&gt;set&lt;/SPAN&gt;; }
        &lt;SPAN class="hljs-keyword"&gt;public&lt;/SPAN&gt; ElementId ViewId { &lt;SPAN class="hljs-keyword"&gt;get&lt;/SPAN&gt;; &lt;SPAN class="hljs-keyword"&gt;set&lt;/SPAN&gt;; }
    }
}

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-sourcepos="75:1-75:34"&gt;&lt;STRONG&gt;Key Concepts and Improvements:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL data-sourcepos="77:1-82:0"&gt;
&lt;LI data-sourcepos="77:1-77:76"&gt;&lt;STRONG&gt;Transaction:&lt;/STRONG&gt; All Revit API modifications must be within a transaction.&lt;/LI&gt;
&lt;LI data-sourcepos="78:1-78:74"&gt;&lt;STRONG&gt;Title Block:&lt;/STRONG&gt; You need to get a title block family to create sheets.&lt;/LI&gt;
&lt;LI data-sourcepos="79:1-79:236"&gt;&lt;STRONG&gt;View Information:&lt;/STRONG&gt; The &lt;CODE&gt;ViewInfo&lt;/CODE&gt; class (or a similar structure) is essential to organize the data for each sheet and the views to be placed. You'll need to populate this with your specific view names, sheet numbers, and view IDs.&lt;/LI&gt;
&lt;LI data-sourcepos="80:1-80:104"&gt;&lt;STRONG&gt;View Placement:&lt;/STRONG&gt; The &lt;CODE&gt;Viewport.Create&lt;/CODE&gt; method places the view on the sheet at a specified location.&lt;/LI&gt;
&lt;LI data-sourcepos="81:1-82:0"&gt;&lt;STRONG&gt;Error Handling:&lt;/STRONG&gt; Production-ready code should include robust error handling (e.g., checking if views exist, handling exceptions).&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-sourcepos="83:1-83:20"&gt;&lt;STRONG&gt;Dynamo Approach:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-sourcepos="85:1-85:87"&gt;Dynamo offers a more visual way to achieve similar automation. You would use nodes to:&lt;/P&gt;
&lt;OL data-sourcepos="87:1-91:0"&gt;
&lt;LI data-sourcepos="87:1-87:16"&gt;Select views.&lt;/LI&gt;
&lt;LI data-sourcepos="88:1-88:58"&gt;Create sheets (potentially with title block selection).&lt;/LI&gt;
&lt;LI data-sourcepos="89:1-89:25"&gt;Place views on sheets.&lt;/LI&gt;
&lt;LI data-sourcepos="90:1-91:0"&gt;Set sheet parameters (number, name, etc.).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-sourcepos="92:1-92:132"&gt;Dynamo is generally easier to learn for basic automation tasks, while the Revit API provides more flexibility for complex scenarios.&lt;/P&gt;
&lt;P data-sourcepos="94:1-94:38"&gt;&lt;STRONG&gt;Video Demonstration and Resources:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-sourcepos="96:1-96:257"&gt;Searching YouTube for "Revit drawing automation" or "Revit API sheet creation" will yield numerous tutorials and demonstrations. Look for videos covering both the Revit API and Dynamo approaches.&lt;/P&gt;
&lt;P data-sourcepos="98:1-98:19"&gt;&lt;STRONG&gt;Recommendation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL data-sourcepos="100:1-102:0"&gt;
&lt;LI data-sourcepos="100:1-100:167"&gt;&lt;STRONG&gt;Start with Dynamo:&lt;/STRONG&gt; If you're new to automation, Dynamo is a great starting point. You can quickly create simple scripts to automate basic drawing creation tasks.&lt;/LI&gt;
&lt;LI data-sourcepos="101:1-102:0"&gt;&lt;STRONG&gt;Move to the Revit API:&lt;/STRONG&gt; For more complex and customized workflows, learning the Revit API (C# or Python) is essential. This will give you complete control over the drawing creation process.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P data-sourcepos="103:1-103:139"&gt;I hope this helps you get started with drawing sheet automation in Revit!&lt;/P&gt;
&lt;P data-sourcepos="103:1-103:139"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P data-sourcepos="103:1-103:139"&gt;Let us know if you have more questions.&lt;/P&gt;
&lt;P data-sourcepos="103:1-103:139"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Feb 2025 05:55:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13296086#M1183</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2025-02-03T05:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Sheet Automation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13299933#M1184</link>
      <description>&lt;P&gt;Interesting, I will to looking into this further.&amp;nbsp; Would there be a way of running several scripts concurrently (ie multi threading) to speed up the process for very large drawing sets.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 20:49:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13299933#M1184</guid>
      <dc:creator>sales7NF7D</dc:creator>
      <dc:date>2025-02-04T20:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Sheet Automation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13299941#M1185</link>
      <description>&lt;P&gt;Nope, not really. The Revit API is single threaded only. Non-Revit-API functionality can be multi-threaded, but the actual sheet creation requires Revit API calls and therefore cannot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 20:53:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13299941#M1185</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2025-02-04T20:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Drawing Sheet Automation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13311314#M1186</link>
      <description>&lt;P&gt;if you don't need to access the geometry on a sheet (for determining the position of a viewport) the creation of sheets and viewports on them is fast.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the views (cropped I assume), optimize the calculations without retrieving coordinates on the sheet/titleblock&lt;/P&gt;&lt;P&gt;Like, knowing how big the titleblock is / position of the sheet etc...&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 22:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/drawing-sheet-automation/m-p/13311314#M1186</guid>
      <dc:creator>TripleM-Dev.net</dc:creator>
      <dc:date>2025-02-10T22:47:27Z</dc:date>
    </item>
  </channel>
</rss>

