Application: PathReinforcement
Revit Platform: All
Revit Version: 2011.0
First Released For: 2008.0
Programming Language: C#
Skill Level: Medium
Category: Structure
Type: ExternalCommand

Subject: Display PathReinforcement informations.
Summary: 
This sample demonstrates how to retrieve curves, profile and properties of path reinforcement object.

Classes: 
Autodesk.Revit.UI.IExternalCommand 
Autodesk.Revit.DB.Structure.PathReinforcement
Autodesk.Revit.DB.Structure.RebarBarType
Autodesk.Revit.DB.ModelCurve

Project Files: 
Command.cs
This file defines a Command class which inherits from IExternalCommand and implements the Execute method. The main function of the class is to show the main dialog.

PathReinforcementForm.cs
This file defines a PathReinforcementForm class which inherits from Form. The class is the main dialog which contains a picture box and a property grid. The picture box is used to display the curves of the path reinforcement and the property grid is used to display the properties of the path Reinforcement.
	
Profile.cs
This file defines a Profile class to store geometry information of path reinforcement. The class contains a public method “Draw” to draw the curves and profile of the path reinforcement.

PathReinProperties.cs
This file defines a PathReinProperties class which contains the path reinforcement properties. And the properties will be displayed in property grid of PathReinforcementForm.

BarTypeConverter.cs
This file defines a BarTypeConverter class used to convert types between ElementId and String.

MathTools.cs
This file defines a Vector4 and a Matrix4 class used to transform geometry data between 2D and 3D.

Description: 
This sample will get path reinforcement from active document and display its properties in a dialog. Curves of path reinforcement will be displayed in picture box and other data be displayed in property grid. The geometry data can be got by “Curves” property of path reinforcement and other properties can be got by “get_Parameter” and “Parameters” methods.

Instructions: 
1.	Open or new a Revit project and make sure some PathReinforcemanes are placed. A sample project file PathReinforcement.rvt is available in the sample’s folder.
2.	Select one PathReinforcement, Run the command, a form will pop up.
3.	The path and the profile of the selected path reinforcement will be displayed in picture box: path in blue color, profile in red color.  
4.	The properties of path reinforcement will be displayed in properties grid; user can change some parameters of the path reinforcement via this property grid.
5.	The changed parameters of path will be updated when clicking Ok button.