Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures
是一组Revit API中的内置失败对象,用于表示与能源分析工具有关的数据库操作的失败状态。这些失败对象可以在Revit API中的各种方法中使用,以便在发生错误时返回相应的失败状态。
Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures
应该在需要表示与能源分析工具有关的数据库操作的失败状态时使用。在使用它们之前,应先通过 FailureHandlingOptions
类的 SetFailuresPreprocessor
方法将其注册。
当数据库操作失败时,应该创建一个新的 FailureMessageAccessor
对象并使用 GetEnergyAnalysisUtilitiesDBFailureMessages
方法获取与能源分析工具有关的失败对象。然后,可以使用 AddFailure
方法将该失败对象添加到 FailureMessageAccessor
中,从而表明该操作已失败。
以下示例代码说明了如何使用 Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures
:
// 注册能源分析工具数据库操作失败处理器
FailureHandlingOptions options = new FailureHandlingOptions();
options.SetFailuresPreprocessor(new EnergyAnalysisUtilitiesDBFailuresPreprocessor());
Document document = ... // 获取当前文档对象
document.PostFailure(options);
// 执行能源分析工具相关的数据库操作
try {
// ... 执行能源分析工具相关的数据库操作
}catch (Exception ex) {
// 创建新的FailureMessageAccessor对象
FailureMessageAccessor failureAccessor = ex.GetFailureMessageAccessor();
// 获取与能源分析工具相关的失败对象
IEnumerable<FailureMessageId> failureIds = Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures.GetEnergyAnalysisUtilitiesDBFailureMessages();
foreach (FailureMessageId failureId in failureIds) {
// 将失败对象添加到FailureMessageAccessor
failureAccessor.AddFailure(failureId);
}
}
Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures
提供以下功能:
EnergyAnalysisUtilitiesDBFailureIds.CreatingAOETableFailed
:创建能源分析临时工具表失败。EnergyAnalysisUtilitiesDBFailureIds.DemandLoadDataNotFound
:在数据库中找不到需求负荷数据。EnergyAnalysisUtilitiesDBFailureIds.FailedToAddVertexInfo
:将顶点信息添加到数据库时出错。EnergyAnalysisUtilitiesDBFailureIds.FailedToUpdateScenarioInfo
:更新能源分析参数场景信息时出错。EnergyAnalysisUtilitiesDBFailureIds.FailedToUpdateSettingInfo
:更新能源分析参数设置信息时出错。EnergyAnalysisUtilitiesDBFailureIds.FailedToUpdateWeatherData
:更新天气数据时出错。EnergyAnalysisUtilitiesDBFailureIds.InconsistentGraphStructure
:能源分析工具图形结构不一致。EnergyAnalysisUtilitiesDBFailureIds.InvalidAOETableField
:无效的能源分析工具表字段。EnergyAnalysisUtilitiesDBFailureIds.InvalidAOSettingObject
:无效的能源分析工具参数设置对象。EnergyAnalysisUtilitiesDBFailureIds.InvalidAllSpacesExportInfo
:无效的所有空间导出信息。EnergyAnalysisUtilitiesDBFailureIds.InvalidAreaAnalysisObject
:无效的能源分析工具面积对象。EnergyAnalysisUtilitiesDBFailureIds.InvalidAvgLookupObject
:无效的能源分析工具平均查找对象。EnergyAnalysisUtilitiesDBFailureIds.InvalidBoundarySegment
:无效的分界线段。EnergyAnalysisUtilitiesDBFailureIds.InvalidBuildingAspect
:无效的建筑视图。EnergyAnalysisUtilitiesDBFailureIds.InvalidBuildingSystemExportInfo
:无效的建筑系统导出信息。EnergyAnalysisUtilitiesDBFailureIds.InvalidConnectedElementsInfo
:无效的连接元素信息。EnergyAnalysisUtilitiesDBFailureIds.InvalidDoorOpeningArea
:无效的门开口面积。EnergyAnalysisUtilitiesDBFailureIds.InvalidDoorOpeningDoc
:无效的门开口文档。EnergyAnalysisUtilitiesDBFailureIds.InvalidFile
:无效的文件。EnergyAnalysisUtilitiesDBFailureIds.InvalidFloorArea
:无效的楼板面积。EnergyAnalysisUtilitiesDBFailureIds.InvalidFloorEdgeData
:无效的楼板边缘数据。EnergyAnalysisUtilitiesDBFailureIds.InvalidFloorFace
:无效的楼板表面。EnergyAnalysisUtilitiesDBFailureIds.InvalidFloorTransform
:无效的楼板变换。EnergyAnalysisUtilitiesDBFailureIds.InvalidGraphPartition
:无效的能源分析工具图形分区。EnergyAnalysisUtilitiesDBFailureIds.InvalidInput
:无效的输入数据。EnergyAnalysisUtilitiesDBFailureIds.InvalidMasses
:无效的形体。EnergyAnalysisUtilitiesDBFailureIds.InvalidOpening
:无效的开口。EnergyAnalysisUtilitiesDBFailureIds.InvalidOpeningArea
:无效的开口面积。EnergyAnalysisUtilitiesDBFailureIds.InvalidPlacement
:无效的放置。EnergyAnalysisUtilitiesDBFailureIds.InvalidPolyLoop
:无效的多段线路径。EnergyAnalysisUtilitiesDBFailureIds.InvalidRadianceInstancePoint
:无效的Radiance实例点。EnergyAnalysisUtilitiesDBFailureIds.InvalidSolarMap
:无效的阳光图。EnergyAnalysisUtilitiesDBFailureIds.InvalidSolarMapElement
:无效的阳光图元素。EnergyAnalysisUtilitiesDBFailureIds.InvalidSpace
:无效的空间。EnergyAnalysisUtilitiesDBFailureIds.InvalidSpaceBoundary
:无效的空间边界。EnergyAnalysisUtilitiesDBFailureIds.InvalidTable
:无效的能源分析工具表格。EnergyAnalysisUtilitiesDBFailureIds.InvalidTemperatureData
:无效的温度数据。EnergyAnalysisUtilitiesDBFailureIds.InvalidView
:无效的视图。EnergyAnalysisUtilitiesDBFailureIds.InvalidWindowToWallRatio
:无效的窗墙比值。EnergyAnalysisUtilitiesDBFailureIds.InvalidZoneReference
:无效的区域参考。EnergyAnalysisUtilitiesDBFailureIds.LoadFamiliesFail
:加载族文件失败。EnergyAnalysisUtilitiesDBFailureIds.LoadIESProfileFail
:加载IES文件失败。EnergyAnalysisUtilitiesDBFailureIds.LoadLibraryFail
:加载库文件失败。EnergyAnalysisUtilitiesDBFailureIds.MissingComponent
:丢失组件。EnergyAnalysisUtilitiesDBFailureIds.MissingRadDefinition
:丢失Radiance定义。EnergyAnalysisUtilitiesDBFailureIds.NoAOETableFound
:在数据库中找不到能源分析工具表。EnergyAnalysisUtilitiesDBFailureIds.NoBoundingBox
:没有边界框。EnergyAnalysisUtilitiesDBFailureIds.NoCollaborationPath
:没有协同路径。EnergyAnalysisUtilitiesDBFailureIds.NoConnectedElements
:没有连接的元素。EnergyAnalysisUtilitiesDBFailureIds.NoDesignOptions
:当前文档中没有设计选项。EnergyAnalysisUtilitiesDBFailureIds.NoEnergyAnalyseResults
:没有能源分析的结果。EnergyAnalysisUtilitiesDBFailureIds.NoElementSelected
:没有选中的元素。EnergyAnalysisUtilitiesDBFailureIds.NoGeometry
:没有几何体。EnergyAnalysisUtilitiesDBFailureIds.NoGraphInDatabase
:数据库中没有能源分析工具图形。EnergyAnalysisUtilitiesDBFailureIds.NoInput
:没有输入数据。EnergyAnalysisUtilitiesDBFailureIds.NoInternalBoundary
:没有内边界。EnergyAnalysisUtilitiesDBFailureIds.NoMassingGeometries
:没有形体几何体。EnergyAnalysisUtilitiesDBFailureIds.NoMaterials
:没有材料。EnergyAnalysisUtilitiesDBFailureIds.NoPhaseInBetween
:没有中间阶段。EnergyAnalysisUtilitiesDBFailureIds.NoRadDefinition
:找不到Radiance定义。EnergyAnalysisUtilitiesDBFailureIds.NoResults
:没有结果。EnergyAnalysisUtilitiesDBFailureIds.NoRooms
:当前文档中没有房间。EnergyAnalysisUtilitiesDBFailureIds.NoSpaceDataSelected
:没有空间数据被选中。EnergyAnalysisUtilitiesDBFailureIds.NotEnoughSpace
:没有足够的空间。EnergyAnalysisUtilitiesDBFailureIds.OpenFileFail
:打开文件失败。EnergyAnalysisUtilitiesDBFailureIds.PickedRoomTurnedOff
:选择的房间已关闭。EnergyAnalysisUtilitiesDBFailureIds.ProgramNotExist
:无法找到程序。EnergyAnalysisUtilitiesDBFailureIds.RealParameterOutOfRange
:实参数超出范围。EnergyAnalysisUtilitiesDBFailureIds.ReportRetry
:在生成报告时失败,重试生成报告。EnergyAnalysisUtilitiesDBFailureIds.RoomCalculationZoneInvalid
:房间计算区域无效。EnergyAnalysisUtilitiesDBFailureIds.RoomCalculationZoneOverlap
:房间计算区域重叠。EnergyAnalysisUtilitiesDBFailureIds.RoomNotClosed
:房间未关闭。EnergyAnalysisUtilitiesDBFailureIds.RoomSizeOutOfRange
:房间尺寸超出范围。EnergyAnalysisUtilitiesDBFailureIds.ScaleFactorOutOfRange
:比例因子超出范围。EnergyAnalysisUtilitiesDBFailureIds.SettingNotFoundException
:未找到能源分析工具设置。EnergyAnalysisUtilitiesDBFailureIds.SpaceCantSeparateFromAdjacentSpace
:空间无法与相邻空间分离。EnergyAnalysisUtilitiesDBFailureIds.SpaceCalculationZoneInvalid
:空间计算区域无效。EnergyAnalysisUtilitiesDBFailureIds.SpaceCalculationZoneOverlap
:空间计算区域重叠。EnergyAnalysisUtilitiesDBFailureIds.TemperatureOutOfRange
:温度超出范围。EnergyAnalysisUtilitiesDBFailureIds.UnattachedGeometryFound
:发现未连接几何体。EnergyAnalysisUtilitiesDBFailureIds.UnrecognizedMeshUnit
:无法识别的网格单位。EnergyAnalysisUtilitiesDBFailureIds.UnsupportedElementTypes
:不支持的元素类型。
## 引用
- [Autodesk.Revit.DB.BuiltInFailures.EnergyAnalysisUtilitiesDBFailures API文档](https://www.revitapidocs.com/2020/9e5544f4-4c05-8f2a-5bf5-5fe5d5dc4e5e.htm)