我正在浏览一座建筑的所有房间(或实际上所有的空间),以便得到每一个空间的相邻空间列表。我读过一些关于这里和这里的相当老的文章,但是这些文章使用了BoundarySegment对象的"Element“属性,例如:
foreach( BoundarySegment s in b )
...
Element neighbour = s.Element;如果我没有弄错的话,这就不能再从BoundarySegment (?)访问墙壁对象了。还有别的选择吗?
谢谢,
阿诺德。
发布于 2017-04-11 07:27:21
到http://www.revitapidocs.com
搜索BoundarySegment类。
我收到了这样的信息:“在活动API年中,2017年的资源不可用.资源只能在2015年使用”。
看看Revit2017 API中的新内容:
http://thebuildingcoder.typepad.com/blog/2016/04/whats-new-in-the-revit-2017-api.html
过时的API删除列出了Autodesk.Revit.DB.BoundarySegment.Element。
你上面提到的两个帖子是:
http://thebuildingcoder.typepad.com/blog/2013/09/room-neighbours.html
http://thebuildingcoder.typepad.com/blog/2009/01/room-and-wall-adjacency.html
两者所提供的所有守则均包括在建筑物编码样本内:
Building示例在GitHub上进行维护,并在出现时迁移到Revit的新版本。因此,您可以看到如何在GitHub上实现相同的功能,如:
samples/blob/master/BuildingCoder/BuildingCoder/CmdRoomWallAdjacency.cs
samples/blob/master/BuildingCoder/BuildingCoder/CmdRoomNeighbours.cs
https://stackoverflow.com/questions/43327513
复制相似问题