MEP units handling / conversions / list usage

Hello to everybody,

the search couldn’t solve my problem, so maybe somebody can help me here.

what i want to do:

I have 3 lists:
List1: Is a calculated parameter - made out of shared parameters --> final unit --> m3/h
List2: Is a calculated parameter - made out of shared parameters --> final unit --> m3/h
List3: Is a calculated parameter -> from the “area” parameter and an figure -> final unit should be --> m3/h

Out of this three lists - i want to make a “maxlist” for each item. So my code checks, which item of [i] is the biggest a inserts it into my maxlist.

This is already running.

whats the problem:

The calculated parameter wich is calculated from the “area” - which is an original Revit parameter -> is from its value wrong, when i write it into a shared parameter. So i guess i ned to make a conversation…
How do i know - what revit makes out of my m3/h into SI-units ?

How do you handle such conversations?


python script:


for i in range(len(list1)):
     item = (max(list1[i],list2[i],list3[i]))

You are probably looking for a conversion function, if so, you could try the Convert Between Units node: Between Units

hey @Yna_Db

thank you for your answere. I already tried this node, but it is not made for MEP (HVAC) units… so i can’t use it for my problem.

Did you take a look at previous threads?

yes - i have red them… but i could not solve my problem.

with which node, do you get out your values out of revit ?

and how do you make calculations if the values come with “units” ?

Quick answer:

okay, i found an workaround.

When i write die “calculated” value in an shared parameter – then it is converted with the MEPover (Set.ParameterAsProjectUnits) node to “m3/h”.

So i can take the converted shared parameter - and use it for my further calculations/comparison in my python script.


The Problem is not the “unit-text-figures” which are added to the numbers.

The Problem is, that Revit does make an difference to the value, when i multiplay the “area” (unit = m2) with an figure (without an unit) when i write the result back to revit in an shared parameter --> which has the unit = m3/h.

When i do the same in Revit in a calcluated parameter, I have to add the “unit” directly in the formular (for example " 1/m²" and " *1 m3/h") to be changed. Thats what I am missing in Dynamo. I can’t tell Revit the real units that it can do the calculation by it self.

Maybe thats not possible…
So i wanted to know, how are you dealing with units…

I would rather let a MEP specialist talk about that (I have also specified the title of this thread):

I don’t really understand your question. You want Dynamo to know which unit is used for certain values and convert accordingly? Sounds like something you have to do manually yourself.

Hello @T_Pover

thank you for reading my problem.
I’am sure - that the problem is on my understanding - on how to handle the “units” in dynamo. But i coulnd’t find an solved MEP problem, which helped me to improve that.

I try do explain my problem in detail:

  • reading the area from each room out of revit with Element.GetParameterValuebyName --> UNIT="m2"

  • reading the shared parameter L-LW je m2 out of revit with Element.GetParameterValuebyName --> UNIT="number"

  • do a multiplication with those 2 Parameters and resolving the problem of “null”

Then i write it back to a shared parameter L-Menge M2


The node SetParameterAsProjectUnits does the conversation --> so the result, written back to revit ist right.

But i do have to make more calcualtions with the results of the SetParameterAsProjectUnits. The input values to the SetParameterAsProjectUnits aren’t converted… soo i don’t know how to convert them…
I also don’t know how to get the converted results from the SetParameterAsProjectUnits node.

thank yout for your time

Thanks for the detailed explanation, but I still can’t see why you can’t use those values further down in your graph? The inputs for the SetParameter node are exactly the same as the values in the Revit schedule right?


no problem :slight_smile:

As you can see, i have pulled the values using the byName node. And wrote it back with the projectUnits node.

If i write them back with the byName node - die values are not right:

This only happens if i use “Revit original” parameters.

For example, if i do the same stuff with “shared parameters” which i created. I can use the byName node on both sides. And the values in revit are right.


If you look at my first post, you can see, that i am making an MAX-Value resolving.
And the problem is, that i can’t compare with the value wich is made out of the “area” parameter.

Why i can’t use them ?? Because - if the “units” would be the same, i could use the “byName” node on both sides.

I hope i could show you the issue ?

I can’t seem to replicate your Revit behaviour, I have created a shared parameter which is of type ‘Air Flow’. When I set this value using Dynamo the units get converted just like they would with a native Revit parameter:



thank you for your respond and time on my problem.
I am now one week on vacation.

After that i going to come up with an RVT-file including the problem. I need to create this problem outside of the project because the file is too big and too much…

1 Like