Application: ElementReportHTML
REXSDK Version: 2018.0
First Released For: REXSDK 2012
Last Modified: 01/07/2016
Modified By: Autodesk
Programming Language: C#
Skill Level: Easy 

Subject: Read properties of elements in the project and prepare the html note which is presented on module’s window.

Summary: 
This sample demonstrates how to create an Extension module based on WPF technology. The module reads elements which exist in the Revit project. Elements are organized according to their categories and presented in the HTML note. There is possibility to limit the content of the note by choosing appropriate categories or specify the single element. The note can be saved in an html or a mht format.

REXSDK values: 
-	Create the REX extension module in WPF technology.
-	Usage of ROHTML component.

Project Files: 

Generated by the wizard:

Extension.cs:
The main class generated by the wizard. It contains definition of the Extension class which is the main class in the REXExtension module. This class is a central point which allows user to manage and customize the module.

ExtensionRevit.cs:
This file contains an ExtensionRevit class. This class allows to separate general functionality (provided by the Extension class) from functionality characteristic for the Revit context e.g. setting layouts may be done in the Extension class but reading Revit elements should be carried out in the ExtensionRevit class.

Data.cs
This file contains a Data class which is a data container accessible from different places in the module. All common objects should be placed in this class.

Application.cs, DirectAccess.cs, Results.cs
These files were generated by the wizard but there is no need to make any changes in their content.

Added manually:

ReportControl.xaml, ReportControl.xaml.cs
These files contain a definition of the control which creates the note and presents it as its content.

ReportSettingsControl.xaml, ReportSettingsControl.xaml.cs
These files contain a definition of the control which allows managing note’s content. 	

Node.cs
This file contains a Node class which represents the single item of the tree structure. There are 4 levels in the tree structure: root, category, element and property. 

Description: 
This sample examines the current project and gathers information about elements which are neither type nor detail components, and which contain the geometry definition). Filtered elements are organized according to their categories. Except the name and the id all parameters of an element are stored and presented in the note.
The dialog is split into two parts:
- The html note – presents the generated note
- The settings of the note – allows customizing the note by choosing appropriate categories or specifying the element by ID.
There is also possibility to save the note as a mht or an html document.

Instructions: 
1.	Copy the module to the …Modules/Category directory
2.	Open Revit Structure.
3.	Open the project with a structure defined (or create it by yourself)
4.	Run the Extension.
5.	Define note’s settings.
6.	Save the note.