Application: PerformanceAdviserControl
Revit Platform: All
Revit Version: 2012.0
First Released For: 2012.0
Programming Language: C#
Skill Level: Beginning
Category: Elements
Type: ExternalCommand, ExternalApplication

Subject: View, select, and run PerformanceAdviser rules.
Summary: 
This program demonstrates the usage the PerformanceAdviser class and related APIs.

Classes: 
Autodesk.Revit.DB.IPerformanceAdviserRule
Autodesk.Revit.DB.PerformanceAdviser

Project Files:                                
Application.cs //the main IExternalApplication implementation
UICommand.cs //the main IExternalCommand implementation
FlippedDoorCheck.cs //the IPerformanceAdviserRule-derived sample implementation
RuleInfo.cs  //A helper class for gathering rule info
TestDisplayDialog.cs  //UI for working with PerformanceAdviser

Description: 
This sample demonstrates how to use the PerformanceAdviser API, a class that allows the user to select certain performance and criteria tests to be run on the elements of the active document.  It also demonstrates how to create custom API-based rules and register them with PerformanceAdviser.

Instructions: 

1.	Open the enclosed document “DoorsAndWalls.rvt;”
2.	Run the external command “Performance Adviser”
3.	Select the “Flipped Door Check” test shown in the dialog.  This an API-defined test implemented in FlippedDoorCheck.cs.
4.   Click “Run Selected Tests,” and examine the results, especially noting the user of GetElementFilter() and ExecuteElementCheck() in FlippedDoorCheck.cs
5.   Run the external command “Performance Adviser” again.  This time, check the “Overlapping walls” test.  Run this test, and note that the two overlapping walls in the model are found.