Reading Flow Rate and Head of Mechanical Equipment

Dear Friends,
i am trying to read Head (pressure value) and Flow Rate (L/s) parameters of mechanical equipment from Dy. However it is not reading correct values. Totally different values. What may be reason of this problem?

Hello kvusal,

Most likely it’s a problem with units, see altso this PR:

You can try this python script and see if you get better results:

import clr

from Autodesk.Revit.DB import *

import Revit

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

# Get parameter and unit type from element
if isinstance(IN[0], list):
	elements = UnwrapElement(IN[0])
	elements = [UnwrapElement(IN[0])]
OUT = []
for element in elements:
	parameter = element.GetParameters(IN[1])[0]
	unitType = parameter.Definition.UnitType
	# Get the display unit for the unit type in the current document
	formatOption = doc.GetUnits().GetFormatOptions(unitType)
	displayUnit = formatOption.DisplayUnits
	#Convert the value with UnitUtils

Hi @kvusal

Within revit it stores all values as feet (Feet², Feet³, etc) this is why when you get some values in dynamo it is reporting the revit database value not the value in the units of your project. The below image will help show you, see “Value” and “As Value String”.

There is a custom node from lunchbox package called “LunchBoxGetParameterValue” that reads the value as string. Here is an example.

1 Like

Kulkul thanks a lot.