| | |
| | | /// <summary>
|
| | | /// 连接
|
| | | /// </summary>
|
| | | public class LianJieParser : BaseParser
|
| | | {
|
| | | public override List<BuiltInCategory> FilterCategories
|
| | | {
|
| | | get |
| | | {
|
| | | return new List<BuiltInCategory> |
| | | {
|
| | | BuiltInCategory.OST_MechanicalEquipment,
|
| | | BuiltInCategory.OST_PipeFitting,
|
| | | BuiltInCategory.OST_PipeAccessory,
|
| | | BuiltInCategory.OST_GenericModel
|
| | | };
|
| | | }
|
| | | }
|
| | | public override List<string> FilterRegexes
|
| | | {
|
| | | get |
| | | {
|
| | | return new List<string> |
| | | {
|
| | | "连接"
|
| | | };
|
| | | } |
| | | }
|
| | | //public class LianJieParser : BaseParser
|
| | | //{
|
| | | // public override List<BuiltInCategory> FilterCategories
|
| | | // {
|
| | | // get |
| | | // {
|
| | | // return new List<BuiltInCategory> |
| | | // {
|
| | | // BuiltInCategory.OST_MechanicalEquipment,
|
| | | // BuiltInCategory.OST_PipeFitting,
|
| | | // BuiltInCategory.OST_PipeAccessory,
|
| | | // BuiltInCategory.OST_GenericModel
|
| | | // };
|
| | | // }
|
| | | // }
|
| | | // public override List<string> FilterRegexes
|
| | | // {
|
| | | // get |
| | | // {
|
| | | // return new List<string> |
| | | // {
|
| | | // "连接"
|
| | | // };
|
| | | // } |
| | | // }
|
| | |
|
| | | public override string GetParserName()
|
| | | {
|
| | | return "连接";
|
| | | }
|
| | | // 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));
|
| | | // 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;
|
| | | }
|
| | | }
|
| | | // 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;
|
| | | // }
|
| | | //}
|
| | | }
|