|
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
|
+using Autodesk.Revit.DB.Mechanical;
|
|
using RevitToJBim.Extension;
|
|
using RevitToJBim.Extension;
|
|
using RevitToJBim.MBI;
|
|
using RevitToJBim.MBI;
|
|
using SAGA.DotNetUtils;
|
|
using SAGA.DotNetUtils;
|
|
@@ -92,6 +93,29 @@ namespace RevitToJBim.Common
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
|
+ /// 获取设备设施的参数
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="fi"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public static List<Parameter> GetSpaceParameters(Space space)
|
|
|
|
+ {
|
|
|
|
+ List<string> parameterNames = new List<string>() { MBIBuiltInParameterName.SpaceName, MBIBuiltInParameterName.SpaceNumber };
|
|
|
|
+ List<Parameter> parameters = new List<Parameter>();
|
|
|
|
+ foreach (var parameterName in parameterNames)
|
|
|
|
+ {
|
|
|
|
+ var revitParameter = space.GetParameter(parameterName);
|
|
|
|
+ if (revitParameter != null)
|
|
|
|
+ {
|
|
|
|
+ var parameter = new Parameter(ParameterUtil.FindParameterDefine(parameterName));
|
|
|
|
+ parameter.Value = revitParameter.AsString();
|
|
|
|
+ parameters.Add(parameter);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return parameters;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
/// 获取部件所关联的设备
|
|
/// 获取部件所关联的设备
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="element"></param>
|
|
/// <param name="element"></param>
|