PerformanceAdviser Class


The tool to report performance problems in a given document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.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

Copy C#
//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);
Copy VB.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

System Object
Autodesk.Revit.DB PerformanceAdviser

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →