AnalysisResultSchema Class

Contains all information about one analysis result. Each result may contain several measurements.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DB.AnalysisAnalysisResultSchema

Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class AnalysisResultSchema : IDisposable

The AnalysisResultSchema type exposes the following members.

Constructors
 NameDescription
Public methodAnalysisResultSchema(AnalysisResultSchema) Constructs a new copy of the input AnalysisResultSchema object.
Public methodAnalysisResultSchema(String, String) Creates object and assigns name and description
Top
Properties
 NameDescription
Public propertyAnalysisDisplayStyleId ElementId of analysis display style overriding the style set for view; -1 if the style is not overridden
Public propertyCurrentUnits Stores the index in the array of applicable units
Public propertyDescription Description of analysis result in view
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyIsVisible If true analysis result is visible in view
Public propertyName Name of analysis result in view
Public propertyScale Multiplier used for displaying diagram or vector values in view.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the AnalysisResultSchema
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetNumberOfUnits returns number of possible units
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetUnitsMultiplier returns units multiplier by index
Public methodGetUnitsName returns units name by index
Public methodIsEqual Determines if the input object is equivalent to this AnalysisResultSchema.
Public methodCode exampleSetUnits Sets names and multipliers of all units for result visualization
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
In order to take effect, the AnalysisResultSchema object has to be registered by calling SpatialFieldManager::RegisterResult, which returns result index for future references; to make changes to the properties of an already registered object, use method SpatialFieldManager::SetResultSchema and supply result index and replacing object.
Example
// By default, each analysis result uses the Analysis Display Style assigned to the view.
// To display different types of results (colored surface, markers, diagram, vector) simultaneously in a single view
// the Analysis Display Style for each result must be set to a style that matches result's type
foreach (int result in spatialFieldManager.GetRegisteredResults()) // get all results for this SpatialFieldManager
{
   AnalysisResultSchema schema = spatialFieldManager.GetResultSchema(result);
   switch (schema.Name)  // check the name of the schema
   {
      case "Reactions": // based on the schema name, set the schema's Analysis Display Style
         schema.AnalysisDisplayStyleId = AnalysisDisplayStyle.FindByName(doc, "Vector");
         break;
      case "Shear":
         schema.AnalysisDisplayStyleId = AnalysisDisplayStyle.FindByName(doc, "Diagram");
         break;
      case "Plate Shear":
         schema.AnalysisDisplayStyleId = AnalysisDisplayStyle.FindByName(doc, "Surface");
         break;
   }
   spatialFieldManager.SetResultSchema(result, schema); // update the schema
}
See Also