Application: MaterialQuantities
Revit Platform: All
Revit Version: 2011.0
First Released For: 2011.0
Programming Language: C#
Skill Level: Advanced
Category: Geometry
Type: ExternalCommand

Subject: 
Material quantity data extraction

Summary: 
Outputs an analysis of the materials that make up walls, floors, and roofs, and displays the output in Excel.

Classes: 
System.Diagnostics.Process
System.Collections.Generic.Dictionary
Autodesk.Revit.DB.FilteredElementCollector
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.Transaction

Project Files:
MaterialQuantities.cs

Description: 
1.	Collect all roof elements
2.	Iterate through each material found in each roof
3.	Find the net volume and area of the material
4.	Store the material quantities
5.	Write the results to the output file
6.	Find the gross material quantities
a.	Start a new transaction
b.	Delete the elements that cut the host (doors, windows, openings)
c.	Find the volume and area for each material
d.	Store the material quantities
e.	Write the results to the output file
f.	Rollback the transaction
7.	Repeat the above steps for walls and floors
8.	Open the output file in Microsoft Excel

Instructions: 
1.	Open MaterialQTestModel.rvt or RAC_DS_01_Door_Schedule_i.rvt
2.	Run the external command
3.	Microsoft Excel will open with a spreadsheet containing information about the material used in the model.