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

Subject: Add profile/edge to a form and manipulate edges/profiles of the form
Summary: 
This sample will demonstrate how to create a simple form and add profile/edge to the form and how to move, rotate scale and delete the existing/added profile/edge. 
Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.ElementSet
Autodesk.Revit.DB.ReferenceArrayArray
Autodesk.Revit.DB.ReferenceArray
Autodesk.Revit.Creation.FamilyItemFactory

Project Files: 
Command.cs
This file contains the class “Command” which inherits from “IExternalCommand” interface and implements the “Execute” method. This class is used to add edges/profiles to a form and manipulate edges/profiles of the form.

Description: 
This sample provides following functionalities.
-   Create a loft form in API.
-   Add a profile to the loft form.
-   Move the edges on added profile.
-   Move the added profile.
-   Move the vertex on bottom profile.
-   Add edge to the loft form and retrieve the added edge.
-   Move the added edge.
-   Move the vertex on added profile.

Implementations:
-	A loft form can be created by Document.FamilyCreate.NewLoftForm(bool isSolid, ReferenceArrayArray profiles) method. 
-   A profile can be added to a form by Form. AddProfile(Reference edgeReference, double param) method.
-   A profile can be moved, rotated or scaled by Form.MoveProfile, Form.RotateProfile or Form.ScaleProfile methods.
-	An edge can be added to a form by Form.AddEdge methods. The added edge can only be retrieved by geometry comparison now.
-   An edge or vertex of the form can be moved, rotated or scaled by Form.MoveSubElement, Form.RotateSubElement or Form.ScaleSubElement methods.

Instructions: 
1.  Open Revit application and create a conceptual mass family by the mass template (at .\ Data\Platform\Imperial\Templates\Conceptual Mass\ Mass.rft).
2.  Execute the command.