<?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 MEP Calculated Values in Shared Parameter in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/mep-calculated-values-in-shared-parameter/m-p/3876967#M79563</link>
    <description>&lt;P&gt;Is there any way of calculating a value from two existing parameters and reporting it to a Shared Parameter by using the Revit API?&lt;/P&gt;&lt;P&gt;My aim is to use this in a Tag to display a different flow value through a pipe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen a plugin doing it for Room Area and occupancy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The image attached shows the parameters i'm using,&lt;/P&gt;&lt;P&gt;"Pressure Factor" &amp;amp; CW Flow are Shared Parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result im looking for:&lt;/P&gt;&lt;P&gt;"Flow/Pressure Factor=CW Flow"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 20 Apr 2013 16:53:50 GMT</pubDate>
    <dc:creator>HeinWelman</dc:creator>
    <dc:date>2013-04-20T16:53:50Z</dc:date>
    <item>
      <title>MEP Calculated Values in Shared Parameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/mep-calculated-values-in-shared-parameter/m-p/3876967#M79563</link>
      <description>&lt;P&gt;Is there any way of calculating a value from two existing parameters and reporting it to a Shared Parameter by using the Revit API?&lt;/P&gt;&lt;P&gt;My aim is to use this in a Tag to display a different flow value through a pipe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen a plugin doing it for Room Area and occupancy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The image attached shows the parameters i'm using,&lt;/P&gt;&lt;P&gt;"Pressure Factor" &amp;amp; CW Flow are Shared Parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result im looking for:&lt;/P&gt;&lt;P&gt;"Flow/Pressure Factor=CW Flow"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2013 16:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/mep-calculated-values-in-shared-parameter/m-p/3876967#M79563</guid>
      <dc:creator>HeinWelman</dc:creator>
      <dc:date>2013-04-20T16:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: MEP Calculated Values in Shared Parameter</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/mep-calculated-values-in-shared-parameter/m-p/3895027#M79564</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is possible to be done by Revit API.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can read the two shared parameters value first, then calculate the value&amp;nbsp;&lt;SPAN&gt;Flow/Pressure Factor, finally assign the value to CW flow parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;here is the code fragment&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pipe pipe = null;&lt;/P&gt;
&lt;P&gt;//pipe is the target pipe. retrieve one target pipe and assign it to pipe variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Parameter flowParam = pipe.get_Parameter("Flow");&lt;/P&gt;
&lt;P&gt;Double flowValue = flowParam.AsDouble();&lt;/P&gt;
&lt;P&gt;Parameer pressureParam = pipe.get_Parameter("Pressure Factor");&lt;/P&gt;
&lt;P&gt;Double pressureValue = pressureParam.AsDouble();&lt;/P&gt;
&lt;P&gt;double cw = flowValue/PressureValue;&lt;/P&gt;
&lt;P&gt;pipe.get_Parameter("CW Flow").Set(cw);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2013 06:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/mep-calculated-values-in-shared-parameter/m-p/3895027#M79564</guid>
      <dc:creator>Joe.Ye</dc:creator>
      <dc:date>2013-04-27T06:08:43Z</dc:date>
    </item>
  </channel>
</rss>

