Application: Reinforcement
Revit Platform: Structure
Revit Version: 2011.0
First Released For: 9.1
Programming Language: C#
Skill Level: High
Category: Structure
Type: ExternalCommand

Subject: Create Rebars.
Summary: 
Show how to create Rebar in concrete element (Beam or Column) which does not have any reinforcement.

Classes: 
Autodesk.Revit.UI.IExternalCommand 
Autodesk.Revit.Creation.Document
Autodesk.Revit.DB.Structure.Rebar
Autodesk.Revit.DB.Structure.StructuralType

Project Files: 
Command.cs
This file defines the class Command which inherits from IExternalCommand interface and implements the Execute method. The function of Execute method is to display a model dialog to create Rebar for the selected element.

FramReinMaker.cs
This file defines FramReinMaker class which is derived by BeamFramReinMaker and ColumnFramReinMaker. The function of these classes is to create Rebar for the selected host elements. If the selected element is a Beam, the maker is BeamFramReinMaker. If the selected element is a Column, the maker is ColumnFramReinMaker.

BeamFramReinMaker.cs
This file defines BeamFramReinMaker class which inherits from FramReinMaker. it is used to create Rebar for Beam.

ColumnFramReinMaker.cs
This file defines ColumnFramReinMaker class which inherits from FramReinMaker. It is used to create Rebar for Column.

BeamFramReinMakerForm.cs
This file defines BeamFramReinMakerForm class which inherits from Form. The function of this class is to prepare parameters for Beam creation.

ColumnFramReinMakerForm.cs
This file defines ColumnFramReinMakerForm class which inherits from Form. The function of this class is to prepare parameters for Column creation.

GeomData.cs
This file defines classes BeamRebarData and ColumnRebarData. They could store information support beam and column reinforcement creation.

GeometrySupport.cs
As The base class, it could support BeamGeometrySupport and ColumnGeometrySupport.and the class also could store some common geometry information. And give some helper functions.

BeamGeometrySupport.cs
As the geometry support for reinforcement creation on beam, it could prepare the geometry information for top rebar, bottom and transverse rebar creation.

ColumnGeometrySupport.cs	
As the geometry support for reinforcement creation on column, it could prepare the geometry information for transverse and vertical rebar creation.

GeomUtil.cs
This file defines GeomUtil class which provides the base geometry operation and it is a static class.

ParameterUtil.cs
This file defines ParameterUtil class which contains utility methods to find or set certain parameter and it is a static class.

Description: 
This sample use Autodesk.Revit.Creation.Document.NewRebar method to create Rebar for the selected host. NewRebar method needs two parameters RebarBarType and RebarHookType. These two parameters can be got by iterating the active document elements. 	

Instructions: 
1.	Open or new a Revit project and make sure some Concrete Beams or Columns without any Reinforcement are placed. A sample project file Reinforcement.rvt is available in the sample’s folder.
2.	Select a concrete Beam or Column, Run the command.
3.	Set the parameters for the rebar in the pop up dialog.
4.	Click Ok, Rebar for the selected element (Beam or Column) will be created.