PerformanceAdviser Class


The tool to report performance problems in a given document.

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

Syntax

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

Remarks

Class is an application-wide singleton that performs a dual role: it is a repository of rules to run in order to detect potential performance problems as well as an access point to execute checks.

Examples

CopyC#
//Get the name of each registered PerformanceRule and then execute all of them.
foreach (PerformanceAdviserRuleId id in PerformanceAdviser.GetPerformanceAdviser().GetAllRuleIds())
{
    string ruleName = PerformanceAdviser.GetPerformanceAdviser().GetRuleName(id);
}
PerformanceAdviser.GetPerformanceAdviser().ExecuteAllRules(document);
CopyVB.NET
'Get the name of each registered PerformanceRule and then execute all of them.
For Each id As PerformanceAdviserRuleId In PerformanceAdviser.GetPerformanceAdviser().GetAllRuleIds()
    Dim ruleName As String = PerformanceAdviser.GetPerformanceAdviser().GetRuleName(id)
Next
PerformanceAdviser.GetPerformanceAdviser().ExecuteAllRules(document)

Inheritance Hierarchy

SystemObject
  Autodesk.Revit.DBPerformanceAdviser

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →