<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sogand Samiee on Medium]]></title>
        <description><![CDATA[Stories by Sogand Samiee on Medium]]></description>
        <link>https://medium.com/@thesogis?source=rss-904678929270------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AMKrFThO-kWC5WIlyktXxA@2x.jpeg</url>
            <title>Stories by Sogand Samiee on Medium</title>
            <link>https://medium.com/@thesogis?source=rss-904678929270------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:25:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thesogis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tracking Filled Region Usage Across Revit Sheets with Dynamo + Python]]></title>
            <link>https://medium.com/@thesogis/tracking-filled-region-usage-across-revit-sheets-with-dynamo-python-164a618efc43?source=rss-904678929270------2</link>
            <guid isPermaLink="false">https://medium.com/p/164a618efc43</guid>
            <category><![CDATA[revit]]></category>
            <category><![CDATA[autodesk]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[dynamo]]></category>
            <category><![CDATA[aec-industry]]></category>
            <dc:creator><![CDATA[Sogand Samiee]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 11:16:01 GMT</pubDate>
            <atom:updated>2026-11-04T11:16:01.433Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Using the Revit API to locate Filled Region instances across drawing sheets and simplify graphical consistency reviews.</em></p><h3>The problem</h3><p>While working on Revit drawing packages, I needed a way to identify where a particular Filled Region type was being used.</p><p>The same type can appear across multiple plans, sections, and details. When updating a hatch or reviewing graphical consistency, manually checking individual views can become repetitive, especially in larger drawing packages.</p><p>My goal was simple: <strong>select a Filled Region and identify which drawing sheets contain views using the same type.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PkIp4AQa5bW1k5xJLNgWcA.png" /></figure><h3>Building the workflow</h3><p>I used Revit 2024, Dynamo, and CPython3 to build a small, read-only utility.</p><p>The Dynamo graph consists of just three nodes:</p><p><strong>Select Model Element → Python Script → Watch</strong></p><p>The user selects an existing Filled Region instance. The Python script identifies its type, searches the active Revit document for matching instances, and filters the results to views placed on sheets.</p><p>The output includes:</p><ul><li>Sheet number and name</li><li>View name</li><li>Number of matching instances</li><li>Revit element IDs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yav80YX_B9t7cDnOJ9w3Gg.png" /></figure><p><em>Figure 1. The three-node Dynamo workflow, displaying matching Filled Region instances grouped by sheet and view.</em></p><h3>How the Revit API connects elements to sheets</h3><p>The key part of the workflow is establishing the relationship between a Filled Region, its owning view, and the sheet on which that view is placed.</p><p>The script uses four main Revit API operations:</p><p>Revit APIPurposeGetTypeId()Identify the selected Filled Region typeFilteredElementCollectorCollect Filled Region instancesOwnerViewIdDetermine which view owns each instanceViewSheet.GetAllPlacedViews()Identify views placed on sheets</p><p>The logic follows five steps:</p><ol><li>Get the type ID of the selected Filled Region.</li><li>Collect Filled Region instances in the active document.</li><li>Keep instances matching the selected type.</li><li>Match their owning views against views placed on sheets.</li><li>Group the results by sheet and view.</li></ol><p>This last step makes the output more useful than a simple list of element IDs. It connects the matching elements to their drawing locations, making them easier to identify during a review.</p><h3>Reviewing the results</h3><p>In one project test, the script returned:</p><ul><li><strong>13 sheeted views</strong> containing matches</li><li><strong>16 matching Filled Region instances</strong></li></ul><p>The results were displayed directly in Dynamo Watch, organized by sheet and view, with instance counts and corresponding element IDs.</p><p>For example, the output identified one view containing three instances of the selected Filled Region type, alongside other views containing individual matches.</p><p>This provides a practical starting point for checking which drawing views may need attention before changing a Filled Region type.</p><p>The utility is intentionally read-only. It does not modify Filled Regions, replace hatch patterns, or change the Revit model.</p><p>There are also some limitations. The script searches only the active Revit document, not linked models. It focuses on eligible views placed on sheets rather than unplaced working views.</p><p>Additionally, identifying an element’s owning view does not guarantee that the element is visible in the final printed drawing. Crop regions and visibility settings may affect whether a matching instance actually appears.</p><p>The output should therefore be treated as a <strong>usage inventory for drawing review</strong>, rather than a complete graphical visibility check.</p><p>Although the workflow is relatively simple, it addresses a practical issue in Revit documentation. For me, the value was not in building a complex tool, but in making existing model information easier to access and use during drawing reviews.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=164a618efc43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revit Design Option Cleanup Tool with Dynamo + Python]]></title>
            <link>https://medium.com/@thesogis/revit-design-option-cleanup-tool-with-dynamo-python-9c5546f2b171?source=rss-904678929270------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c5546f2b171</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[revit]]></category>
            <category><![CDATA[bim]]></category>
            <dc:creator><![CDATA[Sogand Samiee]]></dc:creator>
            <pubDate>Mon, 31 Aug 2026 15:37:31 GMT</pubDate>
            <atom:updated>2026-08-31T15:43:40.693Z</atom:updated>
            <content:encoded><![CDATA[<h3>Problem</h3><p>A Revit model contained Design Options that appeared empty but were difficult to identify reliably through manual review.</p><p>I wanted a small cleanup tool that could:</p><ul><li>identify Design Options with no meaningful model content</li><li>prevent primary options from being deleted</li><li>let the user review candidates before making changes</li><li>optionally delete confirmed candidates</li><li>run without external Dynamo packages</li></ul><p>I used Dynamo for the graph inputs and result display, with a CPython3 node handling the Revit API queries and deletion logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pZHRWzW7beTnlW4zAKuNw.jpeg" /><figcaption>Simplified workflow of the Dynamo + Python Design Option cleanup tool.</figcaption></figure><p><strong>Stack:</strong> Revit · Dynamo · CPython3 · Revit API</p><h3>Approach</h3><p>The graph has two operating states.</p><p>With <strong>Delete = False</strong>, the script performs a read-only scan and classifies the Design Options.</p><p>It reports:</p><ul><li>empty non-primary options</li><li>empty primary options</li><li>options containing qualifying model elements</li><li>deleted options</li><li>deletion failures</li></ul><p>After reviewing the output in Dynamo, the user can change <strong>Delete</strong> to True and run the graph again.</p><p>This keeps detection and modification separate instead of deleting options automatically during every scan.</p><h3>The main problem: what does “empty” actually mean?</h3><p>My first implementation counted all elements returned for each Design Option.</p><p>That produced an obviously incorrect result: one option that appeared empty in Revit was reported as containing approximately <strong>809 elements</strong>.</p><p>The collector itself was not necessarily wrong. The problem was that my definition of meaningful content was too broad.</p><p>I revised the query to collect elements assigned to each Design Option while excluding element types and view-dependent elements:</p><p>FilteredElementCollector(doc) \</p><p>.ContainedInDesignOption(option.Id) \</p><p>.WhereElementIsNotElementType() \</p><p>.WhereElementIsViewIndependent()</p><p>I then inspected the remaining elements by category and retained only model categories:</p><p>cat = element.Category</p><p>if cat is None:</p><p>continue</p><p>if cat.CategoryType != CategoryType.Model:</p><p>continue</p><p>For this workflow, a Design Option is considered <strong>effectively empty</strong> when no view-independent, non-type elements belonging to a model category remain after filtering.</p><p>This does not mean the Design Option contains zero Revit API objects.</p><p>It is a project-specific cleanup rule intended to better represent the type of model content I needed to detect.</p><p>The important lesson from the failed first version was that a technically valid API result is not always the same as a useful BIM result.</p><h3>Protecting primary options</h3><p>An option being effectively empty is not enough to make it eligible for deletion.</p><p>The script also checks:</p><p>option.IsPrimary</p><p>Primary options are always excluded from the deletion candidates.</p><p>If a primary option passes the same empty-content test, it is reported separately so it can be reviewed without being modified.</p><p>The deletion condition is therefore:</p><p>effectively empty</p><p>AND</p><p>non-primary</p><p>AND</p><p>Delete == True</p><p>This safeguard is implemented in the script rather than relying on the user to manually identify primary options before running the tool.</p><h3>Deletion and reporting</h3><p>When deletion is enabled, the modification runs inside a Revit transaction.</p><p>Each eligible option is processed through the API, and successful deletions are reported separately from failures.</p><p>One important detail is that Document.Delete() may also remove dependent elements associated with the Design Option. For that reason, the returned deleted element IDs represent the full set of elements removed by the operation, not just the Design Option itself.</p><p>This matters for a cleanup tool because the output should show what Revit actually changed, not only what the script attempted to change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4wt0fYwn18fJIP3esj3Oag.png" /><figcaption>Final Dynamo graph with Delete set to False, showing read-only inspection results in Watch.</figcaption></figure><p>A simplified workflow looks like this:</p><p>Dynamo inputs</p><p>↓</p><p>CPython3</p><p>↓</p><p>Revit API scan</p><p>↓</p><p>Classify Design Options</p><p>↓</p><p>Protect primary options</p><p>↓</p><p>Preview candidates</p><p>↓</p><p>Optional deletion</p><p>↓</p><p>Report results</p><h3>Dynamo reevaluation</h3><p>During testing I also encountered a Dynamo-specific issue.</p><p>After modifying the Revit model and running the graph again, I wanted the Python node to receive a changed input so the graph would reliably reevaluate.</p><p>My first workaround used an integer slider that had to be manually changed before rerunning the graph.</p><p>I later replaced it with DateTime.Now, connected as a second Python input:</p><p>REFRESH = IN[1] if len(IN) &gt; 1 else 0</p><p>REFRESH is deliberately unused by the Revit logic.</p><p>Its purpose is only to create a changing Dynamo dependency when the graph is explicitly run.</p><p>This removed an unnecessary manual step while keeping the workaround separate from the actual cleanup logic.</p><h3>Result</h3><p>The finished graph provides a small, package-free workflow for reviewing and cleaning Design Options.</p><p>The biggest improvement between the first prototype and the final version was not the deletion code.</p><p>It was changing the question from:</p><p>How many elements are inside this Design Option?</p><p>to:</p><p>Which elements should actually count as meaningful model content for this cleanup task?</p><p>That change turned the API output into something that better matched the Revit workflow I was trying to automate.</p><h3>Current limitations</h3><p>This is a focused internal utility rather than a production Revit add-in.</p><p>The current version:</p><ul><li>operates only on the active Revit document</li><li>does not inspect linked models</li><li>uses Dynamo inputs and Watch output rather than a dedicated interface</li><li>uses a classification rule developed for the project conditions I tested</li><li>does not batch-process multiple models</li></ul><p>Before using the same logic more broadly, I would test the classification rule against a wider range of Revit categories and Design Option configurations.</p><p>For wider deployment, a dedicated interface and more structured transaction and failure reporting would also make the deletion workflow safer and easier to manage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c5546f2b171" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Revit Status Dashboard with Dynamo and Python]]></title>
            <link>https://medium.com/@thesogis/building-a-revit-status-dashboard-with-dynamo-and-python-1aaf68c4c39a?source=rss-904678929270------2</link>
            <guid isPermaLink="false">https://medium.com/p/1aaf68c4c39a</guid>
            <category><![CDATA[aec-industry]]></category>
            <category><![CDATA[bim]]></category>
            <category><![CDATA[revit]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[dynamo]]></category>
            <dc:creator><![CDATA[Sogand Samiee]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 14:46:56 GMT</pubDate>
            <atom:updated>2026-08-24T15:10:45.322Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Built a Revit Status Dashboard with Dynamo and Python</h3><h3>A small Revit 2024 experiment in model status, reporting scope, and AI-assisted development</h3><p>I wanted to test a simple idea: could I create a usable design-status reporting workflow around Revit without building a custom add-in?</p><p>The workflow needed to do four things:</p><ul><li>let a user assign a working status to selected Revit elements;</li><li>show those statuses visually in a dedicated Revit view;</li><li>calculate a progress summary;</li><li>generate an HTML report that could be viewed outside Revit.</li></ul><p>I used <strong>Revit 2024, Dynamo Player, Python, the Revit API, and HTML</strong>.</p><p>This was a prototype rather than a project-management system. The aim was to test the complete information path from model interaction to an external report and see where the approach started to break down.</p><h3>The workflow</h3><p>The prototype used four reporting states:</p><ul><li><strong>Finalised</strong></li><li><strong>Work in Progress</strong></li><li><strong>On Hold</strong></li><li><strong>Not Started</strong></li></ul><p>The first three were assigned manually. Elements within the reporting scope that had not been assigned one of those statuses were reported as <strong>Not Started</strong>.</p><p>The workflow was:</p><p><strong>Select elements in Revit</strong></p><p>→ <strong>Run a Dynamo Player status command</strong></p><p>→ <strong>Python updates Revit selection filters</strong></p><p>→ <strong>Management Update View displays the result</strong></p><p>→ <strong>Reporting graph analyses eligible visible elements</strong></p><p>→ <strong>HTML dashboard shows counts and percentages</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0y8BTi71QGoD1rzB8zOaA.png" /></figure><p>For the prototype, a dedicated 3D view called <strong>Management Update View</strong> also defined the reporting scope.</p><p>That kept the test setup simple, although it meant the reporting scope and the visualization view were coupled together.</p><h3>Assigning status from Dynamo Player</h3><p>My first version used Dynamo selection nodes.</p><p>That worked while building the graph, but it was unnecessary friction in Dynamo Player. I changed the workflow so the user selects the elements directly in Revit before running a command.</p><p>The Python node reads the current Revit selection:</p><p>uiapp = DocumentManager.Instance.CurrentUIApplication</p><p>uidoc = uiapp.ActiveUIDocument</p><p>selected_ids = list(</p><p>uidoc.Selection.GetElementIds()</p><p>)</p><p>I created three Dynamo Player commands:</p><p><strong>Mark Finalised</strong></p><p><strong>Mark Work in Progress</strong></p><p><strong>Mark On Hold</strong></p><p>This meant maintaining three similar graphs, but the interaction was straightforward:</p><p><strong>select elements → choose the required status command</strong></p><p>For this prototype, that trade-off was acceptable.</p><h3>Using Revit selection filters as status storage</h3><p>I did not create a dedicated Revit status parameter.</p><p>Instead, I used three SelectionFilterElement objects to represent the assigned statuses.</p><p>A simplified part of the update logic was:</p><p>current_ids = list(status_filter.GetElementIds())</p><p>for element_id in selected_ids:</p><p>if element_id not in current_ids:</p><p>current_ids.append(element_id)</p><p>status_filter.SetElementIds(current_ids)</p><p>view.SetFilterOverrides(</p><p>status_filter.Id,</p><p>graphic_overrides</p><p>)</p><p>The complete workflow also handled status changes.</p><p>If an element was already <strong>Finalised</strong> and was later marked <strong>On Hold</strong>, the script removed it from the Finalised filter before adding it to the On Hold filter.</p><p>This prevented one element from being counted in more than one assigned status.</p><p>Using selection filters was convenient because they could both hold element IDs and drive graphical overrides in the management view.</p><p>It also created the main weakness of the prototype: the mechanism used for visualization was also being used to represent the underlying status.</p><p>For a quick test this worked. For a longer-lived workflow, I would separate those responsibilities.</p><h3>Revit view and dashboard</h3><p>The Revit view and the dashboard provided different information.</p><p>The dashboard gave the numerical distribution of the four statuses.</p><p>The Revit view showed where those elements were located in the model.</p><p>The reporting graph analysed the eligible visible elements in the <strong>Management Update View</strong> and calculated the four totals.</p><p>In the final test, the dashboard reported <strong>1,233 analysed elements</strong>:</p><ul><li><strong>276 Finalised: 22.4%</strong></li><li><strong>439 Work in Progress: 35.6%</strong></li><li><strong>287 On Hold: 23.3%</strong></li><li><strong>231 Not Started: 18.7%</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wt6GNAmKoP48UxyqCpDXgA.png" /></figure><p>I also experimented with category-level summaries for Planting, Furniture, Softscape and Hardscape.</p><p>That experiment exposed a BIM-data issue that became more relevant than the chart itself.</p><h3>Revit categories were not enough for the classification I needed</h3><p>I initially expected to distinguish <strong>Softscape</strong> and <strong>Hardscape</strong> using Revit category information.</p><p>That did not work because both could be modelled as <strong>Floors</strong>.</p><p>The Revit category described the type of BIM object, but it did not contain enough information to identify the project-specific landscape classification I wanted for the report.</p><p>I then tried using type information.</p><p>My first assumption about the values exposed through the API was also wrong.</p><p>Rather than continuing to modify the script based on expected names, I output the actual metadata into Dynamo Watch nodes and inspected what Revit was returning.</p><p>I then based the test classification on values that actually existed in the model.</p><p>That made the dashboard breakdown work, but the result still depended on project-specific naming.</p><p>I would therefore not reuse that classification logic unchanged on another project.</p><p>A better version would store the required classification explicitly in the model or provide configurable mappings rather than embedding naming assumptions in Python.</p><p>This was an important distinction for the workflow:</p><p><strong>Revit category and reporting classification were not the same thing.</strong></p><h3>The workflow could succeed while the deliverable still failed</h3><p>I encountered another problem after the Revit and Dynamo parts were already working.</p><p>The dashboard originally used a CSS conic-gradient for the circular status chart.</p><p>It displayed correctly in the browser.</p><p>I was also using html2canvas to export the dashboard as an image, and the circular graphic disappeared from the exported version.</p><p>At that point the model data was correct, the Dynamo graph had completed, and the HTML looked correct in the browser.</p><p>The exported deliverable was still wrong.</p><p>I replaced the CSS graphic with SVG, which rendered correctly in both cases.</p><p>It was a small issue, but it forced me to test the workflow as one chain rather than treating a successful Dynamo run as the end of the process:</p><p><strong>Revit → Dynamo → Python → HTML → exported output</strong></p><h3>How I used ChatGPT during development</h3><p>I used ChatGPT as a development assistant while building the prototype.</p><p>I defined the problem, structured the workflow, chose the interaction model, tested the scripts inside Revit, inspected the model data, and decided which approaches to keep.</p><p>ChatGPT mainly helped me:</p><ul><li>explore Revit API approaches;</li><li>draft Python code;</li><li>interpret errors;</li><li>try alternative ways of retrieving metadata;</li><li>debug parts of the HTML output.</li></ul><p>It was not part of the finished workflow.</p><p>The metadata problem was also a useful reminder that generated code could be syntactically reasonable while still being based on a wrong assumption about the Revit model.</p><p>My practical development loop became:</p><p><strong>try an implementation → run it in Revit → inspect the returned data → revise it</strong></p><p>Dynamo Watch was particularly useful during that process.</p><h3>What I would change in the next version</h3><p>The first change would be the way status is stored.</p><p>Instead of using selection-filter membership as the primary status representation, I would store one explicit status value on the element, for example:</p><p><strong>Status = Finalised / Work in Progress / On Hold</strong></p><p>The Revit visualization could then read that value through normal view-filter logic, while the reporting script could read the same value independently.</p><p>The structure would become:</p><p><strong>model status → Revit visualization</strong></p><p><strong>model status → external reporting</strong></p><p>I would also define the reporting scope independently from the Management Update View rather than using one view for both purposes.</p><p>The classification experiment would need the same treatment. Project-specific labels such as Softscape and Hardscape should come from structured model information or configuration rather than assumptions about Revit type names.</p><p>The CSV-based history used during testing would also need a different storage approach if the workflow were used collaboratively or over a longer period.</p><h3>What I took from the prototype</h3><p>The individual pieces of this workflow were relatively simple.</p><p>The useful part was seeing how decisions at one stage affected the next.</p><p>Using selection filters made the first implementation quick, but mixed data and visualization.</p><p>Using Revit category information was easy, but did not describe the project semantics required by the report.</p><p>A dashboard that displayed correctly in a browser still failed when exported.</p><p>And AI-generated implementation ideas still had to be checked against the actual Revit model.</p><p>For me, the next iteration would therefore focus less on adding dashboard features and more on improving the structure of the information behind it.</p><p>The prototype proved that the Revit-to-dashboard workflow was possible.</p><p>It also showed where a prototype architecture would need to change before I would rely on it for a more reusable reporting workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1aaf68c4c39a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>