EnergyAnalysisDetailModel Class


Manage the analytical thermal model.

Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2012

Syntax

C#
public class EnergyAnalysisDetailModel : IDisposable
Visual Basic
Public Class EnergyAnalysisDetailModel _
	Implements IDisposable
Visual C++
public ref class EnergyAnalysisDetailModel : IDisposable

Remarks

The Export to gbXML and the Heating and Cooling Loads features produces an analytical thermal model from the physical model of a building. The analytical thermal model is composed of spaces, zones and planar surfaces that represent the actual volumetric elements of the building. The EnergyAnaysisDetailModel is intended to be generated and used immediately - none of the data or relationships that it contains are updated as changes are made to the corresponding Revit model. Dispose of the generated EnergyAnaysisDetailModel using the Destroy() method as soon as you have extracted the needed information.

Examples

Copy C#
// Collect space and surface data from the building's analytical thermal model
EnergyAnalysisDetailModelOptions options = new EnergyAnalysisDetailModelOptions();
options.Tier = EnergyAnalysisDetailModelTier.Final; // include constructions, schedules, and non-graphical data in the computation of the energy analysis model

EnergyAnalysisDetailModel eadm = EnergyAnalysisDetailModel.Create(doc, options); // Create a new energy analysis detailed model from the physical model
IList<EnergyAnalysisSpace> spaces = eadm.GetAnalyticalSpaces();
StringBuilder builder = new StringBuilder();
builder.AppendLine("Spaces: " + spaces.Count);
foreach (EnergyAnalysisSpace space in spaces)
{
    SpatialElement spatialElement = doc.GetElement(space.CADObjectUniqueId) as SpatialElement;
    ElementId spatialElementId = spatialElement == null ? ElementId.InvalidElementId : spatialElement.Id;
    builder.AppendLine("   >>> " + space.Name + " related to " + spatialElementId);
    IList<EnergyAnalysisSurface> surfaces = space.GetAnalyticalSurfaces();
    builder.AppendLine("       has " + surfaces.Count + " surfaces.");
    foreach (EnergyAnalysisSurface surface in surfaces)
    {
        builder.AppendLine("            +++ Surface from " + surface.OriginatingElementDescription);
    }
}
TaskDialog.Show("EAM", builder.ToString());
Copy VB.NET
' Collect space and surface data from the building's analytical thermal model
Dim options As New EnergyAnalysisDetailModelOptions()
options.Tier = EnergyAnalysisDetailModelTier.Final
' include constructions, schedules, and non-graphical data in the computation of the energy analysis model
Dim eadm As EnergyAnalysisDetailModel = EnergyAnalysisDetailModel.Create(doc, options)
' Create a new energy analysis detailed model from the physical model
Dim spaces As IList(Of EnergyAnalysisSpace) = eadm.GetAnalyticalSpaces()
Dim builder As New StringBuilder()
builder.AppendLine("Spaces: " & spaces.Count)
For Each space As EnergyAnalysisSpace In spaces
    Dim spatialElement As SpatialElement = TryCast(doc.GetElement(space.CADObjectUniqueId), SpatialElement)
    Dim spatialElementId As ElementId = If(spatialElement Is Nothing, ElementId.InvalidElementId, spatialElement.Id)
    builder.AppendLine("   >>> " + space.Name & " related to " & spatialElementId.ToString())
    Dim surfaces As IList(Of EnergyAnalysisSurface) = space.GetAnalyticalSurfaces()
    builder.AppendLine("       has " & surfaces.Count & " surfaces.")
    For Each surface As EnergyAnalysisSurface In surfaces
        builder.AppendLine("            +++ Surface from " + surface.OriginatingElementDescription)
    Next
Next
TaskDialog.Show("EAM", builder.ToString())

Inheritance Hierarchy

System Object
Autodesk.Revit.DB.Analysis EnergyAnalysisDetailModel

See Also