Thermal properties of wall

I’m trying to retrieve a value of thermal properties of wall of a revit model. After collecting wall element by FilteredElementCollector, I’m using ThermalProperties class and a property of that ( which in my case is named ‘HeatTransferCoefficient’). My problem is I could not find how to use the thermal properties class, my code is collecting walls but when it comes to thermal properties, I get error.
My code is here:

from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory,APIObject,ThermalProperties

doc=revit.ActiveUIDocument.Document

#Collect Walls Thermal Conductivity

X1=FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).WhereElementIsNotElementType()
X2=ThermalProperties.HeatTransferCoefficient.get(X1)

for x in X2:
XX1=X2
print(X1X1.AsDouble())

The error I get is ‘getset descriptor is not callabel’

Would you please help me out?

You need to get WallTypes rather than just Wall instances when getting ThermalProperties. It works like this:

walls = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Walls).WhereElementIsElementType()
for w in walls:
	# getting Thermal Properties of WallTypes
	tp = w.ThermalProperties
	# getting ThermalResistance (or other parameter) from Thermal Properites
	# not every WallType has ThermalResistance set
	if tp:
		print tp.ThermalResistance 

Thanks heaps David,
It solved my problem.
On another note, I’m trying to retrieve thickness of roof and floor. For walls there is a Width property in WallType class which does the job. But for roof and floor I’m using the code below and not getting an error, but there is no output in the output window.

import Autodesk.Revit.DB as DB
import clr
from Autodesk.Revit.DB import FilteredElementCollector, BuiltInCategory, Transaction, TransactionGroup,APIObject,ThermalProperties

doc=revit.ActiveUIDocument.Document

Roofs = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Roofs).WhereElementIsElementType()

for r in Roofs:

getting Thickness of Roof

t = r.LookupParameter('Thickness')
if t:
    x=t.AsDouble()
    print (x)

Would you be able to assist for this as well?

Also, if you were to retrieve building’s orientation, how would you do that? I could not find orientation properties in revit.

Thanks in advance.

Make sure to call .ToElements() when wanting to collect elements from DB.FilteredElementCollector as it does not begin running the query until the last step

import clr
import Autodesk.Revit.DB as DB
 
doc = revit.ActiveUIDocument.Document

Roofs = DB.FilteredElementCollector(doc).OfCategory(DB.BuiltInCategory.OST_Roofs).WhereElementIsElementType().ToElements()

for r in Roofs:
    # getting Thickness of Roof
    t = r.LookupParameter('Thickness')
    if t:
        x = t.AsDouble()
        print (x)
1 Like

Thanks Ehsan jan,
I have tried that, but it is still the same. Nothing comes up in the output window. I’ve attached its photo as well.

@Mehdi1994 Roof Type does not have a Thickness property. Roof instances do. So you need to collect the instances. The collector you have filters for Types currently. Change ElementIsElementType to ElementIsNotElementType

import clr
import Autodesk.Revit.DB as DB
 
doc = __revit__.ActiveUIDocument.Document

Roofs = DB.FilteredElementCollector(doc).OfCategory(DB.BuiltInCategory.OST_Roofs).WhereElementIsNotElementType().ToElements()

for r in Roofs:
    # getting Thickness of Roof
    t = r.LookupParameter('Thickness')
    if t:
        x = t.AsDouble()
        print (x)

Thanks Ehsan, it is working now.
I got another issue but as it is under different category, I will create another topic for that.
Cheers