1234567891011121314151617181920212223242526272829303132333435363738 |
- /* ==============================================================================
- * 功能描述:DocExtend
- * 创 建 者:Garrett
- * 创建日期:2018/6/11 16:00:53
- * ==============================================================================*/
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text.RegularExpressions;
- using Autodesk.Revit.DB;
- using SAGA.DotNetUtils;
- using SAGA.RevitUtils.Extends;
- using ServiceRevitLib.Common;
- namespace ServiceRevitLib.Extend
- {
- /// <summary>
- /// DocExtend
- /// </summary>
- public static class DocExtend
- {
- /// <summary>
- /// 获取所有的Docment中,设备或者部件
- /// </summary>
- /// <param name="doc"></param>
- /// <param name="bic"></param>
- /// <returns></returns>
- public static List<Element> GetEqEcElements(this Document doc)
- {
- List<Element> elements = new List<Element>();
- //elements.AddRange(doc.GetElements(typeof(Wall)));
- elements.AddRange(doc.GetElements(typeof(FamilyInstance)));
- return elements.Where(t=>t.IsMbiEquipment()).ToList();
- }
- }
- }
|