Application: PhysicalProp
Revit Platform: Structure
Revit Version: 2011.0
First Released For: 8.0
Programming Language: C#
Skill Level: Beginning
Category: Parameters, Materials
Type: ExternalCommand

Subject: Display physical property.
Summary: 
This sample demonstrates how to get the physical material of a column or beam.

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

Project Files: 
Command.cs
This file defines a class DumpMaterialPhysicalParameters which inherits from IExternalCommand. Its function is to show a message box that contains the material information of the selected column or beam.

Description: 
-	To get the parameters of an element, use FamilyInstance.Parameters.
-	To get the material parameter of a beam or column, iterate through all the parameters of an element by searching Parameter.Definition named "Column Material" or "Beam Material".
-	To get the detail material properties, use Parameter.get_Parameter(BuiltInParameter). 
Such as get_Parameter(BuiltInParameter.PHY_MATERIAL_PARAM_TYPE) to get the material type or use FamilyInstance.Material (recommended). To get more information about BuiltInParameter, please refer to the help file of Revit API.

Instructions: 
1.	Prepare your Revit project. Make sure there are some structural beams, braces or columns in current document. A sample project file RotateFramingObjects.rvt is available in the sample RotateFramingObjects’ folder
2.	Select only one instance of structural column or beam.
3.	Run the command.
4.	It will show the material information of this instance in a message box.