The default rules of the Performance Adviser

Over at the Revit Forum there is talk about Revit Warnings, which is a good excuse to write about PerformanceAdviser. This class lets you analyze the model and warn the user about issues that might harm performance. You can also create your own warnings based on any condition that you can detect with the API.

There are 17 rules hard-coded into Revit.

Get the rules with this code:

public void PerfAdviserGetAllRules()
{
    PerformanceAdviser pa = PerformanceAdviser.GetPerformanceAdviser();
    string s = "";
    foreach (PerformanceAdviserRuleId ruleId in pa.GetAllRuleIds())
    {
        s += pa.GetRuleName(ruleId) + ": " + pa.GetRuleDescription(ruleId) + "\n\n";
    }
    TaskDialog.Show(pa.GetNumberOfRules() + " Rules", s);
}

The rules are:

rules

Advertisements

One thought on “The default rules of the Performance Adviser

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s