完善主体资料,免费赠送VIP会员!
* 主体类型
* 企业名称
* 信用代码
* 所在行业
* 企业规模
* 所在职位
* 姓名
* 所在行业
* 学历
* 工作性质
请先选择行业
您还可以选择以下福利:
行业福利,领完即止!

下载app免费领取会员

NULL

5cdd2dc095060.jpg

二次开发教程:Revit开发BuildingEnvelopeAnalyzer

发布于:2019-07-24 16:43:07

网友投稿

更多

Revit API 里有个BuildingEnvelopeAnalyzer类,帮助文档里对它描述如下:


This class uses a combination of ray-casting and flood-fill algorithms in order to find the building elements that are exposed to the outside of the building. This method can also look for the bounding building elements for enclosed space volumes inside the building.


大概意思就是说这个类可以获取在建筑外面的建筑构件,




下面是一个小测试,


            Document doc = commandData.Application.ActiveUIDocument.Document;

            BuildingEnvelopeAnalyzerOptions opt = new BuildingEnvelopeAnalyzerOptions();



            opt.AnalyzeEnclosedSpaceVolumes = true;

            opt.OptimizeGridCellSize = false;

            opt.GridCellSize = 1;


            BuildingEnvelopeAnalyzer analyzer = BuildingEnvelopeAnalyzer.Create(doc, opt);


            IList<LinkElementId> ids = analyzer.GetBoundingElements();


            List<ElementId> nids =  ids.Select(m => m.HostElementId).ToList();


            UIDocument uidoc = new UIDocument(doc);

            uidoc.Selection.SetElementIds(nids);


            return Result.Succeeded;

本文版权归腿腿教学网及原创作者所有,未经授权,谢绝转载。

未标题-1.jpg

上一篇:二次开发教程:Revit开发ImageView

下一篇:二次开发教程:C# 动态生成程序集

60acb4e0ef112.png