简体   繁体   English

如何在我的 AreaPlan 中引用一个区域?

[英]How do I refer to an Area in my AreaPlan?

I am new to programming Revit-Apis and cannot finde a way to refer to my areas within my AreaPlans on a certain floor.我是 Revit-Apis 编程新手,无法找到在某个楼层的 AreaPlans 中引用我的区域的方法。 How do I do that?我怎么做?

Furthermore: How do I get the area of this certain Area and the rooms that lie within the area.此外:我如何获得这个特定区域的面积以及该区域内的房间。

Thanks in advance!提前致谢!

You must have list of Area then you can get what you want.你必须有区域列表,然后你才能得到你想要的。 To get list of Area use FilteredElementCollector , for example:要获取区域列表,请使用FilteredElementCollector ,例如:

FilteredElementCollector allArea= newFilteredElementCollector(document).OfClass(typeof(Area));

then use LinQ or normal way to get List area然后使用 LinQ 或正常方式获取列表区域

List<Area> listArea = allArea.ToElements().Select(x => (Area)x).ToList();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM