该类是Revit API中的一部分,可用于处理与楼板相关的各种错误和故障。
AnalyticalModelNotAttachedToFloor
:分析模型未连接到楼板AsymmetricWithExtensions
:非对称楼板带有扩展部分BoundaryInsertsNotMatching
:楼板边界插入件不匹配CannotDeleteFloorWithAnalyticalModel
:无法删除带有分析模型的楼板CannotDeleteFloorWithBoundary
:无法删除带有边界的楼板CannotDeleteFloorWithOpening
:无法删除带有开口的楼板ContourLacksOpenings
:轮廓不包括开口FloorAlreadyHasAnalyticalModel
:楼板已经有了分析模型FloorAttributesNotCopied
:楼板属性未被复制FloorBoundaryViolation
:楼板边界问题FloorCreationConflictWithTopography
:楼板创建与地形冲突FloorHostedByInvalidLevel
:楼板托管于无效的层级FloorHostedByWall
:楼板托管于墙体FloorPlanBasedMismatch
:楼板平面不匹配FloorShapeEditorJavaFailures
:楼板形状编辑器Java相关失败FloorSketchNotClosed
:楼板草图未关闭FloorUnsupportedBoundaryObject
:楼板不支持边界对象GapWithExtensions
:带有扩展的间隙IncorrectContour
:不正确的轮廓InvalidBoundaryOffset
:无效的边界偏移InvalidBoundaryProfile
:无效的边界轮廓InvalidFloorDepth
:无效的楼板深度InvalidFloorThickness
:无效的楼板厚度NoSketchOnFloor
:楼板上没有草图OpeningLacksBoundary
:开口缺少边界OpeningNotOnFloor
:开口不在楼板上SketchHasWall
:草图有墙体以下示例演示如何使用FloorFailures类检测和处理楼板边界插入不匹配的错误:
// 获取楼板边界插入不匹配的错误
var boundaryFailure = Document.GetElementIdsWithFailedIds(Document.GetWarnings())
.Select(x => Document.GetElementById(x.GetFailingElementIds().FirstOrDefault()))
.OfType<Floor>()
.Where(x => x.GetFailureMessages().Any(y => y.GetFailureDefinitionId() == BuiltInFailures.FloorFailures.BoundaryInsertsNotMatching))
.FirstOrDefault();
if (boundaryFailure != null)
{
// 手动修复错误
Transaction trans = new Transaction(Document);
trans.Start("Fix Floor Boundary Insert Mismatch");
boundaryFailure.Boundary.Inserts.Clear();
trans.Commit();
}