namespace HStation.Model
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public partial class RevitModel
|
{
|
/// <summary>
|
/// 获取所有组件
|
/// </summary>
|
public List<IRevitParter> GetAllParters()
|
{
|
var list = new List<IRevitParter>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
|
|
return list;
|
|
}
|
|
/// <summary>
|
/// 获取所有节点
|
/// </summary>
|
public List<IRevitNode> GetAllNodes()
|
{
|
var list = new List<IRevitNode>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水源
|
/// </summary>
|
/// <returns></returns>
|
public List<IRevitNode> GetAllWaterSources()
|
{
|
var list = new List<IRevitNode>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管段
|
/// </summary>
|
public List<IRevitLink> GetAllLinks()
|
{
|
var list = new List<IRevitLink>();
|
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
|
|
return list;
|
|
}
|
|
/// <summary>
|
/// 获取所有连接节点
|
/// </summary>
|
public List<IRevitJunction> GetAllJunctions()
|
{
|
var list = new List<IRevitJunction>();
|
if (this.Junctions != null && this.Junctions.Count > 0)
|
{
|
list.AddRange(this.Junctions);
|
}
|
if (this.Nozzles != null && this.Nozzles.Count > 0)
|
{
|
list.AddRange(this.Nozzles);
|
}
|
if (this.Hydrants != null && this.Hydrants.Count > 0)
|
{
|
list.AddRange(this.Hydrants);
|
}
|
if (this.Meters != null && this.Meters.Count > 0)
|
{
|
list.AddRange(this.Meters);
|
}
|
if (this.Flowmeters != null && this.Flowmeters.Count > 0)
|
{
|
list.AddRange(this.Flowmeters);
|
}
|
if (this.Pressmeters != null && this.Pressmeters.Count > 0)
|
{
|
list.AddRange(this.Pressmeters);
|
}
|
if (this.Elbows != null && this.Elbows.Count > 0)
|
{
|
list.AddRange(this.Elbows);
|
}
|
if (this.Threelinks != null && this.Threelinks.Count > 0)
|
{
|
list.AddRange(this.Threelinks);
|
}
|
if (this.Fourlinks != null && this.Fourlinks.Count > 0)
|
{
|
list.AddRange(this.Fourlinks);
|
}
|
if (this.Bluntheads != null && this.Bluntheads.Count > 0)
|
{
|
list.AddRange(this.Bluntheads);
|
}
|
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水池
|
/// </summary>
|
/// <returns></returns>
|
public List<IRevitTank> GetAllTanks()
|
{
|
var list = new List<IRevitTank>();
|
if (this.Tanks != null && this.Tanks.Count > 0)
|
{
|
list.AddRange(this.Tanks);
|
}
|
if (this.Waterboxs != null && this.Waterboxs.Count > 0)
|
{
|
list.AddRange(this.Waterboxs);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水库
|
/// </summary>
|
public List<IRevitReservoir> GetAllReservoirs()
|
{
|
var list = new List<IRevitReservoir>();
|
if (this.Reservoirs != null && this.Reservoirs.Count > 0)
|
{
|
list.AddRange(this.Reservoirs);
|
}
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有管道
|
/// </summary>
|
public List<IRevitPipe> GetAllPipes()
|
{
|
var list = new List<IRevitPipe>();
|
|
if (this.Pipes != null && this.Pipes.Count > 0)
|
{
|
list.AddRange(this.Pipes);
|
}
|
if (this.Translations != null && this.Translations.Count > 0)
|
{
|
list.AddRange(this.Translations);
|
}
|
if (this.Exchangers != null && this.Exchangers.Count > 0)
|
{
|
list.AddRange(this.Exchangers);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有水泵
|
/// </summary>
|
public List<IRevitPump> GetAllPumps()
|
{
|
var list = new List<IRevitPump>();
|
|
if (this.Pumps != null && this.Pumps.Count > 0)
|
{
|
list.AddRange(this.Pumps);
|
}
|
|
return list;
|
}
|
|
/// <summary>
|
/// 获取所有阀门
|
/// </summary>
|
public List<IRevitValve> GetAllValves()
|
{
|
var list = new List<IRevitValve>();
|
|
if (this.Valves != null && this.Valves.Count > 0)
|
{
|
list.AddRange(this.Valves);
|
}
|
|
return list;
|
}
|
|
|
}
|
}
|