Application: ReferencePlane
Revit Platform: All
Revit Version: 2010.0
First Released For: 9.1
Last Modified: 02/26/2008
Modified By: KY Autodesk
Programming Language: C#
Skill Level: Medium
Category: Basics, Geometry
Type: ExternalCommand

Subject: Create ReferencePlane.
Summary: 
This sample shows how to create Reference Plane by Revit API.

Classes: 
	Autodesk.Revit.Document
Autodesk.Revit.Elements.Floor
Autodesk.Revit.Elements.Wall
Autodesk.Revit.Geometry.Options
Autodesk.Revit.Geometry.Line
Autodesk.Revit.Geometry.Solid
Autodesk.Revit.Geometry.Mesh
Autodesk.Revit.Creation.Document

Project Files:
Command.cs
This file contains a class Command which inherits from IExternalCommand interface and implements the Execute method.

ReferencePlaneMgr.cs
This file contains a class ReferencePlaneMgr which consists of some methods about Reference Plane, such as create Reference Plane on wall (or floor), get the parameters of Reference Plane and get the coordinate from wall (or floor) used to create Reference Plane.

ReferencePlaneForm.cs
This file contains a class ReferencePlaneForm inherits from Form class; the form consists of a DataGridView used to display some parameters of all Reference Plane in project.

GeomHelper.cs
This file contains a class GeomHelper which provides utility methods to get geometry data used to create Reference Plane on wall or floor, such as determine whether a face is vertical, find out the three points which makeup a plane and calculate the length between two points.

Description: 
This sample provides the following functionalities:
-	Report all reference planes in current project, show its ID, bubble end, free end and normal. 
-	Allow user to create a reference plane:
-	If user selected wall in Revit then create Reference Plane at the left face of the wall.
-	If user selected floor in Revit then create Reference Plane at the bottom of the floor.

Instructions: 
1.	Draw some Reference Planes. (or open ReferencePlane.rvt)
2.	Draw a Slab or a Wall and Select it.
3.	Run this command.
4.	User can see ID, bubble end, free end, and normal of all Reference Plane in a table.
5.	Click “Create” button to create a new Reference Plane.