Autodesk.Revit.DB.Mechanical.MechanicalSystem是一个Revit API类,用于在Revit机械设计中表示机械系统。
Autodesk.Revit.DB.Mechanical.MechanicalSystem具有以下属性:
Autodesk.Revit.DB.Mechanical.MechanicalSystem具有以下方法:
以下是在Revit API中使用Autodesk.Revit.DB.Mechanical.MechanicalSystem的示例代码:
// 获取当前文档中所有机械系统的列表
FilteredElementCollector collector = new FilteredElementCollector(doc);
ICollection<Element> systems = collector.OfClass(typeof(MechanicalSystem)).ToElements();
foreach (MechanicalSystem system in systems)
{
// 获取机械系统的类型
switch (system.AirSystemType)
{
case AirSystemType.Unknown:
Console.WriteLine("Unknown Air System");
break;
case AirSystemType.Central:
Console.WriteLine("Central Air System");
break;
case AirSystemType.Decentral:
Console.WriteLine("Decentral Air System");
break;
}
// 获取支持的空气末端的类型
IList<System.Type> airTerminalTypes = system.GetAirTerminalTypes();
foreach (System.Type type in airTerminalTypes)
{
Console.WriteLine("Supported Air Terminal Type: " + type.Name);
}
}