| | |
| | | using Autodesk.Revit.DB; |
| | | using Autodesk.Revit.DB.Plumbing; |
| | | using Glodon.Revit.Utility; |
| | | using HStation.RevitDev.RevitDataExport.Common; |
| | | using HStation.RevitDev.RevitDataExport.Utility; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace HStation.RevitDev.RevitDataExport.Parser |
| | | { |
| | | /// <summary> |
| | | /// 水泵 |
| | | /// </summary> |
| | | public class PumpParser : BaseParser |
| | | { |
| | | public override List<BuiltInCategory> FilterCategories |
| | | { |
| | | get |
| | | { |
| | | return new List<BuiltInCategory> |
| | | { |
| | | BuiltInCategory.OST_MechanicalEquipment, |
| | | BuiltInCategory.OST_GenericModel |
| | | }; |
| | | } |
| | | } |
| | | public override List<string> FilterRegexes |
| | | { |
| | | get |
| | | { |
| | | return new List<string> |
| | | { |
| | | "(?!水泵接合|热泵)", |
| | | "泵","DFCL","消防水泵" |
| | | }; |
| | | } |
| | | } |
| | | |
| | | public override string GetParserName() |
| | | { |
| | | return "水泵"; |
| | | } |
| | | |
| | | public override List<Tuple<string, string>> PropertyParse(Element elem) |
| | | { |
| | | var result = new List<Tuple<string, string>>(); |
| | | var fi = elem as FamilyInstance; |
| | | if (fi == null) { return result; } |
| | | var connectInfos = MEPHelper.GetConnecters(fi); |
| | | result.AddRange(CommonPropertyParse(elem)); |
| | | for (int i = 1; i <= 5; i++) |
| | | { |
| | | if (connectInfos.Count >= i) |
| | | { |
| | | result.Add(new Tuple<string, string>($"连接点{i}", connectInfos[i - 1]?.ElementId.ToString())); |
| | | } |
| | | else |
| | | { |
| | | result.Add(new Tuple<string, string>($"连接点{i}", string.Empty)); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | | } |
| | | using Autodesk.Revit.DB;
|
| | | using HStation.RevitDev.Model.AttributeClass;
|
| | | using HStation.RevitDev.RevitDataExport.Common;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace HStation.RevitDev.RevitDataExport.Parser
|
| | | {
|
| | | /// <summary>
|
| | | /// 水泵
|
| | | /// </summary>
|
| | | /// |
| | | [RevitType(Model.ModelEnum.RevitType.RFT_Pump)]
|
| | | public class PumpParser : BaseParser
|
| | | {
|
| | | public override List<BuiltInCategory> FilterCategories
|
| | | {
|
| | | get |
| | | {
|
| | | return new List<BuiltInCategory> |
| | | {
|
| | | BuiltInCategory.OST_MechanicalEquipment,
|
| | | BuiltInCategory.OST_GenericModel
|
| | | };
|
| | | }
|
| | | }
|
| | | public override List<string> FilterRegexes
|
| | | {
|
| | | get |
| | | {
|
| | | return new List<string> |
| | | {
|
| | | "(?!水泵接合|热泵)",
|
| | | "泵","DFCL","消防水泵"
|
| | | };
|
| | | } |
| | | }
|
| | |
|
| | | public override string GetParserName()
|
| | | {
|
| | | return "水泵";
|
| | | }
|
| | |
|
| | | public override List<Tuple<string, string>> PropertyParse(Element elem)
|
| | | {
|
| | | var result = new List<Tuple<string, string>>();
|
| | | var fi = elem as FamilyInstance;
|
| | | if (fi == null) { return result; }
|
| | | var connectInfos = MEPHelper.GetConnecters(fi);
|
| | | result.AddRange(CommonPropertyParse(elem));
|
| | | for (int i = 1; i <= 5; i++)
|
| | | {
|
| | | if (connectInfos.Count >= i)
|
| | | {
|
| | | result.Add(new Tuple<string, string>($"连接点{i}", connectInfos[i - 1]?.ElementId.ToString()));
|
| | | }
|
| | | else
|
| | | {
|
| | | result.Add(new Tuple<string, string>($"连接点{i}", string.Empty));
|
| | | }
|
| | | }
|
| | | return result;
|
| | | }
|
| | | }
|
| | | }
|