Application: ChangesMonitor
Revit Platform: All
Revit Version: 2011.0
First Released For: 2011.0
Programming Language: C#
Skill Level: Medium
Category: Basics
Type: ExternalApplication

Subject: Track the changes in document.
Summary: 
This sample demonstrates how to subscribe the DocumentChanged event to controlled application level, and how this event works.
Classes: 
Autodesk.Revit.UI. IExternalApplication
Autodesk.Revit.DB.DocumentChangeArgs
Project Files: 
·	ChangesMonitor.cs
This file contains a class ExternalApplication which implements IExternalApplication interface and provides an entry of the sample. In this class, a modeless dialog will be created to track the changed elements’ information.
This file also contains a class Command which inherits from IExternalCommmand interface. The function of the class is to show the information dialog again once user closed it.

·	ChangesInfoForm.cs
This file contains a form class ChangesInfomationForm which consists of one DataGridView to show the user the information of the changed element. The information includes the change type (Added, Deleted, and Modified), the element id, the element name, the category name of the element and the document which owns the changed element.

Description: 
The sample pop up a modeless dialog named “Changes Information Form” when the Revit application starts.

Once users do some modification, like create an element or move an element. The sample lists the changed elements’ information like change style, element Id, element name, element category and the document which owns the element in the modeless window.

Instructions: 
1.	Run Revit and new a project. A modeless dialog shows on the right bottom of the screen.
2.	Modify the document like create, move or delete an element. The changed elements’ information will be dumped to the modeless dialog.
3.	If you close the dialog and want to show it again, you can go the the Add-Ins à ExternalTools àShowChangesInfoForm to retrieve the dialog again.