Application: ParameterUtils
Revit Platform: All
Revit Version: 2011.0
First Released For: 8.1
Programming Language: C#
Skill Level: Beginning
Category: Parameters
Type: ExternalCommand

Subject: Display parameters.
Summary: 
This sample demonstrates how to get the parameters of a Revit element.

Classes: 
Autodesk.Revit.DB.Element 
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.Document

Project Files: 
Command.cs
This file contains the class Command which inherits from IExternalCommand. The function of it is to retrieve all the parameters which a selected element has, and then show them in a list view of a form.

PropertiesForm.cs
This file contains a Form class which consists of ok, cancel buttons and a list view which lists the information of parameters of the selected element.

Description: 
-	To get the collection of selected elements, use Document.Selection.Elements.
-	To get the collection of parameters that the element has, use Element.Parameters.
-	Use Parameter.StorageType to get the parameter storage type and with the corresponding function (such as AsDouble() if the storage type is double) to get the value of it.
-	To retrieve the element with its id, use Document.get_Element(ElementId id).
-	To get the name of element, use Element.Name.
-	ListView is used to show the string array in which each string stands for single parameter information.

Instructions: 
1.	Select only one element, such as a wall or floor and so on. (Note: if none or more than one element is selected, command will return failed and give an error message).
2.	Run the command.