|
@@ -5,24 +5,20 @@
|
|
|
* 版本号:v1.0
|
|
|
* -------------------------------------------------------------------------*/
|
|
|
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
using Autodesk.Revit.DB;
|
|
|
using Autodesk.Revit.DB.Mechanical;
|
|
|
-using Autodesk.Revit.DB.Plumbing;
|
|
|
using JBIM;
|
|
|
using JBIM.Definition;
|
|
|
-using RevitExport;
|
|
|
using RevitExport.Export;
|
|
|
using RevitToJBim.Common;
|
|
|
using RevitToJBim.ParseData;
|
|
|
using SAGA.RevitUtils.Extends;
|
|
|
using SAGA.RevitUtils.MEP;
|
|
|
-using JDuctShape = JBIM.Definition.DuctShape;
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
using JDuct = JBIM.Component.Duct;
|
|
|
+using JDuctShape = JBIM.Definition.DuctShape;
|
|
|
using XYZ = JBIM.Definition.XYZ;
|
|
|
|
|
|
namespace RevitToJBim.ComponentParse
|
|
@@ -59,8 +55,16 @@ namespace RevitToJBim.ComponentParse
|
|
|
#region 关联数据处理相关
|
|
|
#region 系统关系
|
|
|
var pipeId = duct.Id.ToString();
|
|
|
- var systemTypeName = duct.Document.GetElement(duct.MEPSystem.GetTypeId());
|
|
|
- jDuct.MepSystemTypeName = systemTypeName.Name;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var systemTypeName = duct.Document.GetElement(duct.MEPSystem?.GetTypeId());
|
|
|
+ jDuct.MepSystemTypeName = systemTypeName?.Name;
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Console.WriteLine(e.Message+e.StackTrace);
|
|
|
+ }
|
|
|
+
|
|
|
#endregion
|
|
|
|
|
|
ConnectorProfileType shape = ConnectorProfileType.Invalid;
|