2012-02-17 23 views
0

如何使用Revit API獲取當前房間和當前房間的最高限額?我正在使用2012版本。獲取房間的地板和天花板

I`ve嘗試:

segments = el.GetBoundarySegments(new SpatialElementBoundaryOptions()); 

和:

var cs = el.ClosedShell; 

即使這樣:

SpatialElementGeometryCalculator calculator = 
    new SpatialElementGeometryCalculator(doc); 

SpatialElementGeometryResults results = 
    calculator.CalculateSpatialElementGeometry(el); 

Solid roomSolid = results.GetGeometry(); 

foreach (Face face in roomSolid.Faces) 
{ 
    // Subface Code 
} 

回答

0

我想有沒有簡單的方法來做到這一點。您需要在面上循環,就像在第三個樣本中一樣,然後將法向與Z向量進行比較(使用XYZ.IsAlmostEqualTo)。