Application: ArchSample
Revit Platform: All
Revit Version: 2009.0
First Released For: 8.0
Last Modified: 02/26/2008
Modified By: LL Autodesk
Programming Language: VB.NET
Skill Level: Medium
Category: Database (parameter)
Type: ExternalCommand

Subject: Export data to Excel.
Summary: 
This sample exports the contents of an entire project to Microsoft Excel 2003.

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Collections.Map
Autodesk.Revit.Collections.MapIterator
Autodesk.Revit.ElementSet
Autodesk.Revit.Element
Autodesk.Revit.Parameter
Autodesk.Revit.ParameterSet
Autodesk.Revit.Collections.Set

Project Files: 
Command.vb
It contains the class Command which implements interface IExternalCommand and main functions such as searching all the elements based upon category, sending the data to Excel.

Description: 
This sample provides following functionalities.
-	Search the entire Revit project and sort the elements based upon category. Revit Symbols (Types) are ignored as we are only interested in instances of elements.
-	Take a category and a set of elements that belong to that category and find the common properties between those elements.
-	Send the names and values of these properties to Excel and add the category as a new sheet.
-	Each category in the Revit project will be translated to a worksheet in Excel. Each sheet will contain a column for each parameter that is shared amongst the elements within that category, such as wall area.
The unit of values in the Excel will be imperial. To use metric unit some converting work should be involved.

Instructions: 
You must have Microsoft Excel 2003 or higher version for this sample.
1.	Open Revit.
2.	Execute the external command.