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# |
|---|
|
| Visual Basic |
|---|
|
| Visual C++ |
|---|
|
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
//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); '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)