Application: StructSample
Revit Platform: All
Revit Version: 2011.0
First Released For: 8.0
Programming Language: C#
Skill Level: Beginning
Category: Structure
Type: ExternalCommand

Subject: Column creation and placing.
Summary: 
This sample demonstrates how to place a set of columns in the selected wall.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.Parameter
Autodesk.Revit.DB.BuiltInParameter
Autodesk.Revit.DB.FamilyInstance
Autodesk.Revit.DB.Family
Autodesk.Revit.DB.Symbols.FamilySymbol
Autodesk.Revit.DB.Geometry.XYZ
Autodesk.Revit.DB.Geometry.UV
Autodesk.Revit.DB.Geometry.Line

Project Files: 
Command.cs
This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method. The class implements all functions for placing column to wall, such as finding one specialized column symbol from Family and placing column.

Description: 
This sample uses FamilyInstance, Family, FamilySymbol methods mostly to find a specialized column; then place this column to some selected walls with specialized spacing. (Note: the column type and interval between two columns are hard codes).
-	To retrieve all the symbols of one Family, use Autodesk.Revit.Elements.Family.Symbols property and use Autodesk.Revit.Symbols.FamilySymbol.Name to get specialized column type.
-	To create new column, use Autodesk.Revit.Document.Create.NewFamilyInstance method; Use Autodesk.Revit.Elements.FamilyInstance.Location to change or rotate column.
-	To get/set the Column’s base & top levels, use Autodesk.Revit.Parameters.BuiltInParameter.FAMILY_BASE_LEVEL_PARAM and FAMILY_TOP_LEVEL_PARAM parameters in FamilyInstance.get_Parameter () method. 
-	To get/set the relevant information (vector, length) of wall and column, use methods and properties of classes Autodesk.Revit.Geometry.XYZ, UV, Line.

Instructions: 
1.	Start Revit, load “M_Wood Timber Column” column family from Revit library file (M_Wood Timber Column.rfa), afterwards, there should have “191 x 292mm” type column in project. 
2.	One .rvt sample named StructSample.rvt is available under sample project folder, this file contain required family symbol and four walls, you can select one or more walls and then run this sample, columns will placed to walls after running. 
3.	Draw some walls and constrain their top and bottom to the levels in the properties dialog, then select them.
4.	Run the command, it will place columns along each selected wall with the interval of 5 feet.

Note:
The column type and interval between two columns are hard codes.