Autodesk.Revit.DB.ThermalAsset 是一个用于管理 Revit 中的建筑热学资产的类。
ThermalAsset(ElementId thermalAssetId, Document document)通过指定的 thermalAssetId 和 document 构造一个 ThermalAsset 实例。
ElementId ThermalAssetId获取或设置热学资产元素的 ID。
string Name获取或设置热学资产的名称。
double R Value获取或设置热学资产的 R 值。
double U Value获取或设置热学资产的 U 值。
bool IsValidThermalAssetElementId(ElementId thermalAssetId, Document document)判断指定的 thermalAssetId 是否为有效的热学资产元素 ID,在 document 中是否存在。
// 获取当前文档中所有的热学资产元素
FilteredElementCollector thermalAssetCollector = new FilteredElementCollector(document).OfClass(typeof(ThermalAsset));
foreach (ThermalAsset asset in thermalAssetCollector)
{
// 输出热学资产的名称和R值
TaskDialog.Show("Thermal Asset", "Name: " + asset.Name + "; R Value: " + asset.RValue);
}