1

Steps to reproduce the issue

(Using Revit 2021.1.3)

  1. Create materials through Revit API and assign them a thermal asset:
  2. Assign material to a wall layer
  3. See that thermal conductivity is filled but resistance is still 0: thermal asset not taken into account

Explored solution

Manual workaround

  1. Manually modify any parameter like commentary
  2. See that this time resistance is now not 0 which means that thermal asset is now taken into account thermal asset taken into account

Things which did not work

  1. Modify commentary through Revit API in a separate transaction

Current work in progress source code

Current work in progress source code can be found in pyRevitMEP repo

Cyril Waechter
  • 517
  • 4
  • 16

1 Answers1

1

I found an example in Revit API documentation. Apparently setting thermal property set through ThermalAssetId property is not the way to go. We need to use SetMaterialAspectByPropertySet method instead.

revit_material = doc.GetElement(Material.Create(doc, layer_name))
thermal_asset = ThermalAsset(layer_name, ThermalMaterialType.Solid)
thermal_asset.ThermalConductivity = UnitUtils.ConvertToInternalUnits(
                    thermal_conductivity,
                    DisplayUnitType.DUT_WATTS_PER_METER_KELVIN,
                )
thermal_property_set = PropertySetElement.Create(doc, thermal_asset)

material.SetMaterialAspectByPropertySet(MaterialAspect.Thermal, thermal_property_set.Id)
Cyril Waechter
  • 517
  • 4
  • 16