Autodesk.Revit.DB.FamilyThermalProperties是Revit API中的一个类,用于表示Revit族的热学特性。该类具有以下属性:
使用FamilyThermalProperties类可以实现对族材料的热学特性进行设置和获取。
FamilyThermalProperties类没有公共的构造函数。只能通过Family.CreateNewMaterial方法来创建一个新的族材料,并为该材料设置热学特性。使用Family.GetMaterialAndSubComponentData方法可以获取族材料及其热学特性。
以下示例代码演示了如何创建一个新的族材料,并设置该材料的热学特性:
// 创建一个新的Family对象
Family family = document.FamilyCreate();
// 创建一个新的族材料,并为该材料设置热学特性
FamilyThermalProperties thermalProperties = new FamilyThermalProperties(0.8, 2500, 1000, 0.7, 0.8, 0.2, 0.5);
FamilyMaterial material = family.CreateNewMaterial("New Material");
material.SetThermalProperties(thermalProperties);
以下示例代码演示了如何获取族材料及其热学特性:
// 获取第一个族材料及其热学特性
Family family = document.FamilyManager.CurrentFamily;
FamilyItem familyItem = family.get_Item(0);
FamilyMaterial material;
FamilyThermalProperties thermalProperties;
if (familyItem.IsMaterial && familyItem.GetMaterialAndSubComponentData(out material, out thermalProperties))
{
double conductivity = thermalProperties.Conductivity;
double density = thermalProperties.Density;
double specificHeat = thermalProperties.SpecificHeat;
double thermalAbsorptance = thermalProperties.ThermalAbsorptance;
double thermalEmissivity = thermalProperties.ThermalEmissivity;
double thermalReflectance = thermalProperties.ThermalReflectance;
double thermalTransmittance = thermalProperties.ThermalTransmittance;
}