Application: GenericModelCreation
Revit Platform: All
Revit Version: 2011.0
First Released For: 2010.0
Programming Language: C#
Skill Level: Medium
Category: Families
Type: ExternalCommand

Subject: Create Generic Model
Summary: 
This sample shows how to create Generic Model through Revit API

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.GeometryObject
Autodesk.Revit.Creation.FamilyItemFactory

Project Files: 
Command.cs
This file contains the class Command that inherits from IExternalCommand. The class implements the Execute method and be used to create family in Revit.

Description: 
This sample mostly uses the FamilyItemFactory class for implementing the functionality: creating Extrusion/ Blend/ Revolution/ Sweep/ SweptBlend elements.
-	To get a SketchPlane, use CreateSketchPlane().
-	To get a Curve, use Autodesk.Revit.Creation.Application.Create.NewLineBound () and Append it to a CurveArray to get the array.
-	Autodesk.Revit.Creation.FamilyItemFactory.NewXXXX() create families.

Instructions: 
1.	In order to create a family, user should manually create a family document by a template document (Generic Model wall based.rft is attached).
2.	Click the extern command, five Generic Model elements should be created as Extrusion/ Blend/ Revolution/ Sweep/ SweptBlend.