Analysis. Autodesk 2014 Platform API
Quảng cáo
Quảng cáo
Analysis
Energy Data
The EnergyDataSettings object represents the gbXML Parameters in the Revit project. To view the parameters, from the Revit UI, select
Project Information from the Project Settings panel on the Manage tab. The Project Information dialog box appears.
Figure 153: EnergyDataSettings
The EnergyDataSettings object is derived from the Element base object. It is unique in each project, similar to ProjectInformation. Though
EnergyDataSettings is a subclass of the Element class, most of the members inherited from the Element return null or an empty set except for Name, Id, UniqueId, and Parameters.
The following code sample uses the EnergyDataSettings class. The result appears in a TaskDialog after invoking the command.
Code Region 28-7: Using the EnergyDataSettings class
} public void GetInfo_EnergyData(Document document)
{
EnergyDataSettings energyData = EnergyDataSettings.GetFromDocument(document); if (null != energyData)
{
} string message = "energyData : "; message += "\nBuildingType : " + energyData.BuildingType;
TaskDialog.Show("Revit", message);
Analysis Visualization
The Revit API provides a mechanism for external analysis applications to easily display the results of their computation in the Revit model.
The SpatialFieldManager class is the main class for communicating analysis results back to Revit. It is used to create, delete, and modify the
"containers" in which the analysis results are stored. The AnalysisResultSchema class contains all information about one analysis result, such as a description and the names and multipliers of all units for result visualization. Multiple AnalysisResultSchemas can be registered with the SpatialFieldManager.
The AnalysisDisplayStyle class can then be used to control the appearance of the results. Creation and modification of AnalysisDisplayStyle from a plug-in is optional; end users can have the same control over the presentation of the analysis results with the Revit UI.
Tải xuống
Quảng cáo