完善主體資料,免費(fèi)贈(zèng)送VIP會(huì)員!
* 主體類型
* 企業(yè)名稱
* 信用代碼
* 所在行業(yè)
* 企業(yè)規(guī)模
* 所在職位
* 姓名
* 所在行業(yè)
* 學(xué)歷
* 工作性質(zhì)
請(qǐng)先選擇行業(yè)
您還可以選擇以下福利:
行業(yè)福利,領(lǐng)完即止!

下載app免費(fèi)領(lǐng)取會(huì)員

NULL

ad.jpg

二次開發(fā)教程:Revit開發(fā)BuildingEnvelopeAnalyzer

發(fā)布于:2019-07-24 16:43:07

網(wǎng)友投稿

更多

Revit API 里有個(gè)BuildingEnvelopeAnalyzer類,幫助文檔里對(duì)它描述如下:


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.


大概意思就是說這個(gè)類可以獲取在建筑外面的建筑構(gòu)件,




下面是一個(gè)小測試,


            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;

本文版權(quán)歸腿腿教學(xué)網(wǎng)及原創(chuàng)作者所有,未經(jīng)授權(quán),謝絕轉(zhuǎn)載。

未標(biāo)題-1.jpg

上一篇:二次開發(fā)教程:Revit開發(fā)ImageView

下一篇:二次開發(fā)教程:C# 動(dòng)態(tài)生成程序集

60acb4e0ef112.png