Application: FreeFormElement
Revit Platform: All
Revit Version: 2014.0
First Released For: 2014.0
Programming Language: C#
Skill Level: Medium
Category: Geometry
Type: ExternalApplication

Subject: FreeFormElement creation
Summary: 
Use geometry tools to create a new family which has a cutout from an existing element. 

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.FreeFormElement
Autodesk.Revit.DB.BooleanOperationsUtils
Autodesk.Revit.DB.CurveLoop
Autodesk.Revit.DB.Curve

Project Files: 
•	Application.cs - Implements the Revit add-in IExternalApplication.
•	CreateNegativeBlockCommand.cs - A command to create a new family block representing a negative of a selected element. 
•	FreeFormElementUtils.cs - Utilities supporting the creation of a family containing a FreeFormElement which is cut out from existing geometry.
•	
Description: 
This sample:
•	Prompts the user to select a solid element in the project to use as a template.
•	Prompts the user to select a closed loop of curves parallel to the XY plane.
•	Creates a generic model family.
•	Creates a FreeFormElement in the family.  The geometry will consist of:
o	The closed loop of curves extruded upward to above the height of the target
o	The geometry of the target subtracted from the extruded block
•	Loads the family into the project, and places an instance aligned with the original curves.

Instructions: 
1.	Open the included Revit project or another project with proper elements set up.
2.	Select the Add-ins -> FreeForm -> Create negative block button
3.	Select the target solid element.
4.	Select the loop of curves (all curves must be selected one-by-one or via box-select).
5.	Choose Finish.

The new family should be created, loaded and placed in the model.