Application: ModelLines
Revit Platform: All
Revit Version: 2010.0
First Released For: 2008.2
Last Modified: 02/26/2008
Modified By: JL Autodesk
Programming Language: C#
Skill Level: Beginning
Category: Elements
Type: ExternalCommand

Subject: Display and Create ModelLines.
Summary: 
This sample shows how to get model lines of all kinds and how to create model lines using Revit API.

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Elements.ModelArc
Autodesk.Revit.Elements.ModelLine
Autodesk.Revit.Elements.ModelCurveArray
Autodesk.Revit.Elements.ModelCurve
Autodesk.Revit.Elements.SketchPlane
Autodesk.Revit.Creation.Application
Autodesk.Revit.Geormetry.Arc
Autodesk.Revit.Geormetry.XYZ
Autodesk.Revit.Geormetry.Line

Project Files:

ModelLines.cs
This file contains the ModelLines Class which is the main class and takes charge of showing the number of each model line type and creating one instance for each type using Revit API.

ModelLinesForm.cs
This is the main form to show all the model lines and allow user to create model lines and sketch plan.

Description: 
-	Get the number of each model line type in a list. ModelLines can be located by iterating through the document elements. Such as ModelArc, ModelEllipse and ModelLine, etc.
-	For creating a ModelArc type model line, input three points to create it.
-	For creating a ModelLine type model line, input two points to create it.
-	For the other types, select a base model curve which provides the corresponding curve and then input offset vector from the selected base model curve.
-	Select a sketch plane to place the created model curve and you can also create a new sketch plane if you want. The creation of sketch plane can be done with NewSketchPlane() method in Autodesk.Revit.Creation.Document class.
-	The creation of model lines can be done with NewModelCurve() and NewModelCurveArray() methods in Autodesk.Revit.Creation.Document class.

Instructions: 
1.	Draw some model lines in Revit.
2.	Load the ModelLines.dll and run the command, it will get all model lines in Revit and display the number of each type.
3.	You can create a model line type by inputting some information on a sketch plan. Such as input three points to create a ModelArc type model line and then click the create button.
4.	You can also create a new sketch plan using the “New” button. You should supply two model lines to create it.