Application: FireRating
Revit product and version: All
Last Modified: 13/12/2006
Modified By: CL Autodesk HSL
Programming Language: VB.NET

Subject: This program defines three commands: ApplyParameter which is used to add a new shared parameter; ExportFireRating which is used to export fire rating values to an Excel file and ImportFireRating which is used to import fire rating values from the Excel file and apply them to doors.

Classes: 
Autodesk.Revit.IExternalCommand  
Autodesk.Revit.Parameters
Autodesk.Revit.Category

Project Files: 
ApplyParameter.vb
This file contains a class Command which inherits from IExternalCommmand interface and is used to add a new shared parameter to Revit and apply it to all doors.

ExportFireRating.vb
This file contains a class Command which inherits from IExternalCommmand interface and is used to export fire rating values to an Excel file.

ImportFireRating.vb
This file contains a class Command which inherits from IExternalCommmand interface and is used to import fire rating values from the Excel file and apply them to doors.

MainModule.vb
A Module contains names and paths.

Description: 
This program defines three commands: 
-	ApplyParameter - add a new shared parameter to revit and apply it to all doors. 
-	ExportFireRating - export fire rating values to an Excel file.
-	ImportFireRating - import fire rating values from the Excel file and apply them to doors.

Instructions: 
1.	Open Revit.
2.	Draw a few walls and place a couple of doors.  Execute the "Apply Fire Rating" command.  This will add a shared parameter to Revit and apply it to all the doors. Pick any level select a door and look at the properties. You'll see a property named "Fire Rating" has been added to the door. 
3.	Run the "Export Fire Rating" command. This will launch Excel and extract all the fire ratings to excel. You can see the one that you changed in there.Pick any door and set a new value in Excel under the fire rating column. (Take note of the level and the id. We are going to import it with the next command.) Save the excel file and close excel.
4.	Run the "Import Fire Rating" command.  This will load the file and read the data from excel back to the model.Bring up the element properties and notice that the fire rating has been changed.