浏览代码

mxg:更改模板

mengxiangge 4 年之前
父节点
当前提交
9f386a11e0

+ 1 - 7
Executer/DataExport/JBIM/Definition/ConnectorShape.cs

@@ -26,11 +26,5 @@ namespace JBIM.Definition
         Rectangle=1,
         Ellipse=2
     }
-
-    public enum ConnectorDomain
-    {
-        DomainUndefined=0,
-        DomainPiping =1,
-        DomainHvac,
-    }
+    
 }

二进制
Executer/DataExport/MBIResource/DataCheck/模型检查结果输出格式-模版.xlsx


+ 25 - 37
Executer/DataExport/RevitToJBim/ComponentParse/ParseCore.cs

@@ -32,34 +32,34 @@ namespace RevitToJBim.ComponentParse
     /// </summary>
     public class ParseCore
     {
-       //获取可用的解析类
-       public static List<ParseBase> GetUseParsers()
+        //获取可用的解析类
+        public static List<ParseBase> GetUseParsers()
+        {
+            List<ParseBase> result = new List<ParseBase>();
+            Assembly assembly = Assembly.GetCallingAssembly();
+            Type[] types = assembly.GetTypes();
+            foreach (var type in types)
             {
-                List<ParseBase> result = new List<ParseBase>();
-                Assembly assembly = Assembly.GetCallingAssembly();
-                Type[] types = assembly.GetTypes();
-                foreach (var type in types)
+                if (typeof(ParseBase).IsAssignableFrom(type))
                 {
-                    if (typeof(ParseBase).IsAssignableFrom (type))
-                    {
-                        if (type.IsAbstract || type.IsGenericTypeDefinition)
-                            continue;
-                        var attribute = type.GetCustomAttribute<UsableParseAttribute>();
-                        if (attribute == null)
-                            continue;
-                        var construstor = type.GetConstructor(Type.EmptyTypes);
-                        if (construstor == null)
-                            continue;
-                        if (construstor.Invoke(null) is ParseBase parse)
-                            result.Add(parse);
+                    if (type.IsAbstract || type.IsGenericTypeDefinition)
+                        continue;
+                    var attribute = type.GetCustomAttribute<UsableParseAttribute>();
+                    if (attribute == null)
+                        continue;
+                    var construstor = type.GetConstructor(Type.EmptyTypes);
+                    if (construstor == null)
+                        continue;
+                    if (construstor.Invoke(null) is ParseBase parse)
+                        result.Add(parse);
 
-                    }
                 }
+            }
+
+            return result;
 
-                return result;
+        }
 
-            }
-     
         public static void AttachObject(ComponentObject bimObj, ElementWrapper wrapper)
         {
             bimObj.SourceId = wrapper.SourceId;
@@ -67,21 +67,9 @@ namespace RevitToJBim.ComponentParse
         }
         public static JConnector CreateConnector(Autodesk.Revit.DB.Connector connector)
         {
-            var result= new JConnector();
+            var result = new JConnector();
             result.SourceId = RevitIdGenerator.GetConnectorId(connector);
-            switch (connector.Domain)
-            {
-                case Domain.DomainHvac:
-                {
-                    result.Domain = ConnectorDomain.DomainHvac.ToString();
-                    break;
-                }
-                case Domain.DomainPiping:
-                {
-                    result.Domain = ConnectorDomain.DomainPiping.ToString();
-                    break;
-                }
-            }
+            result.Domain = connector.Domain.ToString();
             result.IsConnected = connector.IsConnected;
             result.Description = connector.Description;
             result.Origin = BimConvert.ConvertToXYZ(connector.Origin);
@@ -104,7 +92,7 @@ namespace RevitToJBim.ComponentParse
         /// <param name="element"></param>
         /// <param name="connectors"></param>
         /// <returns></returns>
-        public static ElementOneToManyRel GetConnectorRels(Element element,List<Autodesk.Revit.DB.Connector> connectors)
+        public static ElementOneToManyRel GetConnectorRels(Element element, List<Autodesk.Revit.DB.Connector> connectors)
         {
             ElementOneToManyRel relMany = new ElementOneToManyRel(element.Id.ToString()) { RelatedObjects = new List<string>() };
             relMany.SetElementType(TypeDefinition.Property_ConnectedIds);