EnergyAnalysisDetailModel Class


Manage the analytical thermal model.

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

Syntax

C#
public class EnergyAnalysisDetailModel : Element
Visual Basic
Public Class EnergyAnalysisDetailModel _
	Inherits Element
Visual C++
public ref class EnergyAnalysisDetailModel : public Element

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. If there are currently no EnergyAnalysisDetailModel elements in the document, when the first one is generated it will be considered the persistent energy model (and maybe removed and recreated by actions the user takes in the UI). If there is already a persistent EnergyAnalysisDetailModel element in the document, the API can generate other independent energy models, but they will not be affected by the actions the user takes in the UI. The EnergyAnalysisDetailModel will remain in the document until it is discarded (either by the actions of the user, or by a call to Document.Delete() ).

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
options.EnergyModelType = EnergyModelType.SpatialElement;   // Energy model based on rooms or spaces

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.SpaceName + " 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
options.EnergyModelType = EnergyModelType.SpatialElement
' Energy model based on rooms or spaces
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.SpaceName + " 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 Element
Autodesk.Revit.DB.Analysis EnergyAnalysisDetailModel

See Also