<?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 Location of Calculated Total and Static Pressure for Duct Systems in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/location-of-calculated-total-and-static-pressure-for-duct/m-p/13298295#M1159</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revit has a Duct Sizing tool that allows users to size duct systems based on 4 different sizing methods. It also has a System Inspector tool that allows users to hover over/click various parts of a system and it displays information such as the section number, total section flow, Total Pressure , Static Pressure, Pressure Loss. In the below images, the pressure-related values are shown as 'Not Computed' as I have not yet run the duct sizing tool on the system.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-02-04_08h35_06.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1462381iCCA6C9FE84173B86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2025-02-04_08h35_06.png" alt="2025-02-04_08h35_06.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-02-04_08h43_41.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1462382iBDD0E09180CF477E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2025-02-04_08h43_41.png" alt="2025-02-04_08h43_41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to know where Revit saves the total and static pressure information shown on the tags. I have looked through the ducting parameters and MEPSystem parameters on Revit Lookup and have been unable to locate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can someone assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 06:55:33 GMT</pubDate>
    <dc:creator>oliviagFSF72</dc:creator>
    <dc:date>2025-02-04T06:55:33Z</dc:date>
    <item>
      <title>Location of Calculated Total and Static Pressure for Duct Systems</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/location-of-calculated-total-and-static-pressure-for-duct/m-p/13298295#M1159</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revit has a Duct Sizing tool that allows users to size duct systems based on 4 different sizing methods. It also has a System Inspector tool that allows users to hover over/click various parts of a system and it displays information such as the section number, total section flow, Total Pressure , Static Pressure, Pressure Loss. In the below images, the pressure-related values are shown as 'Not Computed' as I have not yet run the duct sizing tool on the system.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-02-04_08h35_06.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1462381iCCA6C9FE84173B86/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2025-02-04_08h35_06.png" alt="2025-02-04_08h35_06.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-02-04_08h43_41.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1462382iBDD0E09180CF477E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2025-02-04_08h43_41.png" alt="2025-02-04_08h43_41.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to know where Revit saves the total and static pressure information shown on the tags. I have looked through the ducting parameters and MEPSystem parameters on Revit Lookup and have been unable to locate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can someone assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 06:55:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/location-of-calculated-total-and-static-pressure-for-duct/m-p/13298295#M1159</guid>
      <dc:creator>oliviagFSF72</dc:creator>
      <dc:date>2025-02-04T06:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Location of Calculated Total and Static Pressure for Duct Systems</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/location-of-calculated-total-and-static-pressure-for-duct/m-p/13298735#M1160</link>
      <description>&lt;P&gt;They may be calculated dynamically and not stored at all. Here is what Gemini thinks about this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="model-response-message-contentr_5b7b3ec75963b79e" class="markdown markdown-main-panel stronger" dir="ltr"&gt;
&lt;P data-sourcepos="1:1-1:391"&gt;Let's dive into the intricacies of accessing duct pressure information in Revit via the API. You're right, the Total and Static Pressure values displayed by the System Inspector aren't directly stored as parameters on the duct elements or the &lt;CODE&gt;MEPSystem&lt;/CODE&gt;. Revit calculates these dynamically during duct sizing and analysis. Therefore, you can't directly retrieve them as stored properties.&lt;/P&gt;
&lt;P data-sourcepos="3:1-3:128"&gt;Here's a breakdown of how to get the pressure information, combining best practices and addressing the nuances of the Revit API:&lt;/P&gt;
&lt;P data-sourcepos="5:1-5:32"&gt;&lt;STRONG&gt;Understanding the Challenge:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-sourcepos="7:1-7:190"&gt;The pressure calculations are performed by Revit's internal analysis engine. The API doesn't expose the raw calculated values directly. We need to leverage the analysis results indirectly.&lt;/P&gt;
&lt;P data-sourcepos="9:1-9:22"&gt;&lt;STRONG&gt;Solution Strategy:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL data-sourcepos="11:1-16:0"&gt;
&lt;LI data-sourcepos="11:1-12:0"&gt;
&lt;P data-sourcepos="11:4-11:117"&gt;&lt;STRONG&gt;Execute Duct Sizing:&lt;/STRONG&gt; You must programmatically run the duct sizing tool to trigger the pressure calculations.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-sourcepos="13:1-14:0"&gt;
&lt;P data-sourcepos="13:4-13:187"&gt;&lt;STRONG&gt;Access Analysis Results:&lt;/STRONG&gt; The key is to access the &lt;CODE&gt;MEPAnalyticalResults&lt;/CODE&gt; associated with the duct system. This object holds the analysis data, including pressure drop information.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-sourcepos="15:1-16:0"&gt;
&lt;P data-sourcepos="15:4-15:257"&gt;&lt;STRONG&gt;Navigate the Results:&lt;/STRONG&gt; The &lt;CODE&gt;MEPAnalyticalResults&lt;/CODE&gt; provides access to pressure loss information. However, directly getting &lt;EM&gt;total&lt;/EM&gt; and &lt;EM&gt;static&lt;/EM&gt; pressure at a specific point requires some calculation. We typically get pressure &lt;EM&gt;drop&lt;/EM&gt; across a segment.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-sourcepos="17:1-17:22"&gt;&lt;STRONG&gt;Code Example (C#):&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="code-block ng-tns-c928644770-16 ng-trigger ng-trigger-codeBlockRevealAnimation"&gt;
&lt;DIV class="code-block-decoration header-formatted gds-title-s ng-tns-c928644770-16 ng-star-inserted"&gt;&lt;SPAN class="ng-tns-c928644770-16"&gt;C#&lt;/SPAN&gt;
&lt;DIV class="buttons ng-tns-c928644770-16 ng-star-inserted"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="formatted-code-block-internal-container ng-tns-c928644770-16"&gt;
&lt;DIV class="animated-opacity ng-tns-c928644770-16"&gt;
&lt;PRE class="ng-tns-c928644770-16"&gt;&lt;CODE class="code-container formatted ng-tns-c928644770-16" role="text" data-test-id="code-content" data-sourcepos="19:1-90: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.MEP;
&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-comment"&gt;// ... (Revit add-in setup)&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;GetDuctPressure&lt;/SPAN&gt;(&lt;SPAN class="hljs-params"&gt;Document doc, Duct duct&lt;/SPAN&gt;)&lt;/SPAN&gt;
{
    &lt;SPAN class="hljs-comment"&gt;// 1. Ensure Duct Sizing is Run (Programmatically)&lt;/SPAN&gt;
    MEPModel mepModel = doc.GetMEPModel();
    MEPSystem ductSystem = duct.MEPSystem;
    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (ductSystem == &lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt;)
    {
        TaskDialog.TaskDialog.Show(&lt;SPAN class="hljs-string"&gt;"Error"&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;"Selected duct is not part of a system."&lt;/SPAN&gt;);
        &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt;;
    }

    &lt;SPAN class="hljs-comment"&gt;// Trigger Duct Sizing (Important!)&lt;/SPAN&gt;
    mepModel.CalculateDuctSystem(ductSystem); &lt;SPAN class="hljs-comment"&gt;// Or a more specific sizing method if needed&lt;/SPAN&gt;


    &lt;SPAN class="hljs-comment"&gt;// 2. Access Analytical Results&lt;/SPAN&gt;
    MEPAnalyticalResults results = ductSystem.GetAnalyticalResults();

    &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (results == &lt;SPAN class="hljs-literal"&gt;null&lt;/SPAN&gt;)
    {
        TaskDialog.TaskDialog.Show(&lt;SPAN class="hljs-string"&gt;"Error"&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;"No analytical results found for the system."&lt;/SPAN&gt;);
        &lt;SPAN class="hljs-keyword"&gt;return&lt;/SPAN&gt;;
    }

    &lt;SPAN class="hljs-comment"&gt;// 3. Navigate and Extract Pressure Drop (Not Total/Static Directly)&lt;/SPAN&gt;
    IList&amp;lt;MEPAnalyticalSegment&amp;gt; segments = results.GetAnalyticalSegments();

    &lt;SPAN class="hljs-keyword"&gt;foreach&lt;/SPAN&gt; (MEPAnalyticalSegment segment &lt;SPAN class="hljs-keyword"&gt;in&lt;/SPAN&gt; segments)
    {
        ElementId elementId = segment.ElementId; &lt;SPAN class="hljs-comment"&gt;// Get the Duct or Fitting associated with the segment&lt;/SPAN&gt;

        &lt;SPAN class="hljs-keyword"&gt;if&lt;/SPAN&gt; (elementId == duct.Id) &lt;SPAN class="hljs-comment"&gt;// Find the results for our duct.&lt;/SPAN&gt;
        {
            &lt;SPAN class="hljs-comment"&gt;// Get Pressure Drop (This is what we can directly access)&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; pressureDrop = segment.PressureDrop; &lt;SPAN class="hljs-comment"&gt;// In Pascals&lt;/SPAN&gt;

            &lt;SPAN class="hljs-comment"&gt;// ***Calculating Total and Static Pressure***&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// This is the tricky part.  Revit doesn't directly give total/static at a point.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// You would typically need to:&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// a. Get the pressure drop across the segment.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// b. Know the upstream pressure (which might require traversing the system).&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// c. Calculate Static Pressure: Static Pressure (downstream) = Static Pressure (upstream) - Pressure Drop&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// d. Total Pressure: Total Pressure = Static Pressure + Dynamic Pressure (Dynamic Pressure = 0.5 * density * velocity^2. Velocity is also calculated by Revit)&lt;/SPAN&gt;
            &lt;SPAN class="hljs-comment"&gt;// You'll likely need to traverse the duct system to build up the pressure profile.&lt;/SPAN&gt;

            &lt;SPAN class="hljs-comment"&gt;// Example (Simplified - Requires more context for a real implementation)&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; upstreamStaticPressure = &lt;SPAN class="hljs-number"&gt;0&lt;/SPAN&gt;; &lt;SPAN class="hljs-comment"&gt;// You'll need to determine this by traversing the system.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; downstreamStaticPressure = upstreamStaticPressure - pressureDrop;

            &lt;SPAN class="hljs-comment"&gt;// Note: You will need to get the air density and velocity to calculate total pressure.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; airDensity = &lt;SPAN class="hljs-number"&gt;1.225&lt;/SPAN&gt;; &lt;SPAN class="hljs-comment"&gt;// Example - Get from project or system properties.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; velocity = &lt;SPAN class="hljs-number"&gt;10&lt;/SPAN&gt;; &lt;SPAN class="hljs-comment"&gt;// Example - You need to get this information from Revit analysis.&lt;/SPAN&gt;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; dynamicPressure = &lt;SPAN class="hljs-number"&gt;0.5&lt;/SPAN&gt; * airDensity * velocity * velocity;
            &lt;SPAN class="hljs-built_in"&gt;double&lt;/SPAN&gt; downstreamTotalPressure = downstreamStaticPressure + dynamicPressure;


            TaskDialog.TaskDialog.Show(&lt;SPAN class="hljs-string"&gt;"Duct Pressure Info"&lt;/SPAN&gt;, &lt;SPAN class="hljs-string"&gt;$"Pressure Drop: &lt;SPAN class="hljs-subst"&gt;{pressureDrop}&lt;/SPAN&gt; Pa, Downstream Static Pressure: &lt;SPAN class="hljs-subst"&gt;{downstreamStaticPressure}&lt;/SPAN&gt; Pa, Downstream Total Pressure: &lt;SPAN class="hljs-subst"&gt;{downstreamTotalPressure}&lt;/SPAN&gt; Pa"&lt;/SPAN&gt;);
            &lt;SPAN class="hljs-keyword"&gt;break&lt;/SPAN&gt;; &lt;SPAN class="hljs-comment"&gt;// Exit loop once we find the duct.&lt;/SPAN&gt;
        }
    }
}


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-sourcepos="92:1-92:38"&gt;&lt;STRONG&gt;Key Improvements and Explanations:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL data-sourcepos="94:1-101:0"&gt;
&lt;LI data-sourcepos="94:1-94:148"&gt;&lt;STRONG&gt;Duct Sizing Trigger:&lt;/STRONG&gt; Explicitly calls &lt;CODE&gt;mepModel.CalculateDuctSystem(ductSystem)&lt;/CODE&gt; to ensure the calculations are performed. This is &lt;EM&gt;crucial&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI data-sourcepos="95:1-95:118"&gt;&lt;STRONG&gt;Analytical Segments:&lt;/STRONG&gt; Uses &lt;CODE&gt;results.GetAnalyticalSegments()&lt;/CODE&gt; which provides a more granular view of the analysis.&lt;/LI&gt;
&lt;LI data-sourcepos="96:1-96:91"&gt;&lt;STRONG&gt;Pressure Drop:&lt;/STRONG&gt; Extracts &lt;CODE&gt;segment.PressureDrop&lt;/CODE&gt; which is the directly available value.&lt;/LI&gt;
&lt;LI data-sourcepos="97:1-97:203"&gt;&lt;STRONG&gt;Calculating Total/Static:&lt;/STRONG&gt; Explains the crucial point that total and static pressures at a &lt;EM&gt;point&lt;/EM&gt; are not directly available. We must calculate them based on pressure drop and upstream conditions.&lt;/LI&gt;
&lt;LI data-sourcepos="98:1-98:141"&gt;&lt;STRONG&gt;Simplified Example:&lt;/STRONG&gt; Provides a simplified illustration of the calculation. A real implementation requires traversing the duct system.&lt;/LI&gt;
&lt;LI data-sourcepos="99:1-99:68"&gt;&lt;STRONG&gt;Error Handling:&lt;/STRONG&gt; Includes checks for null results and systems.&lt;/LI&gt;
&lt;LI data-sourcepos="100:1-101:0"&gt;&lt;STRONG&gt;Comments:&lt;/STRONG&gt; Added comments for clarity.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-sourcepos="102:1-102:27"&gt;&lt;STRONG&gt;Further Considerations:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL data-sourcepos="104:1-108:0"&gt;
&lt;LI data-sourcepos="104:1-104:222"&gt;&lt;STRONG&gt;System Traversal:&lt;/STRONG&gt; You'll need to implement a method to traverse the duct system to determine upstream pressures. This might involve getting connected elements, their flow directions, and accumulating pressure drops.&lt;/LI&gt;
&lt;LI data-sourcepos="105:1-105:117"&gt;&lt;STRONG&gt;Air Properties:&lt;/STRONG&gt; Get air density from the project or system properties for accurate total pressure calculation.&lt;/LI&gt;
&lt;LI data-sourcepos="106:1-106:187"&gt;&lt;STRONG&gt;Velocity:&lt;/STRONG&gt; You'll need to find a way to get velocity information from the analysis results. This might require further exploration of the &lt;CODE&gt;MEPAnalyticalResults&lt;/CODE&gt; or related objects.&lt;/LI&gt;
&lt;LI data-sourcepos="107:1-108:0"&gt;&lt;STRONG&gt;Units:&lt;/STRONG&gt; Be mindful of units (Pascals, etc.) and conversions if needed.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-sourcepos="109:1-109:269"&gt;This detailed approach should give you a solid foundation for retrieving and calculating duct pressure information in your Revit add-in. Remember, the key is to trigger the analysis and then work with the analytical results. Let me know if you have any other questions.&lt;/P&gt;
&lt;P data-sourcepos="109:1-109:269"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P data-sourcepos="109:1-109:269"&gt;Here is a description by The Building Coder of a modeless pressure drop tool whipped up in 2009, 15 years ago, that might also be of interest:&lt;/P&gt;
&lt;P data-sourcepos="109:1-109:269"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI data-sourcepos="109:1-109:269"&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2009/10/modeless-pressure-drop-tool.html" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2009/10/modeless-pressure-drop-tool.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-sourcepos="109:1-109:269"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Feb 2025 11:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/location-of-calculated-total-and-static-pressure-for-duct/m-p/13298735#M1160</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2025-02-04T11:57:50Z</dc:date>
    </item>
  </channel>
</rss>

