Creates a new sketch plane from a geometric plane. 
   Namespace:   Autodesk.Revit.DB  
  Assembly:   RevitAPI  (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0) 
  Since:  2014 
Syntax
| C# | 
|---|
|  | 
| Visual Basic | 
|---|
|  | 
| Visual C++ | 
|---|
|  | 
Parameters
- document
-  Type:  Autodesk.Revit.DB Document  
 The document.
- plane
-  Type:  Autodesk.Revit.DB Plane  
 The geometry plane where the sketch plane will be created.
Return Value
The newly created sketch plane.Remarks
 There will not be a reference relationship established from the sketch plane to the input face. To create a SketchPlane with a reference to other geometry, use the overload with a Reference input. 
 Examples
 Copy  C#
 Copy  C# public static SketchPlane CreateSketchPlane(Autodesk.Revit.DB.Document document, Plane plane)
{
    SketchPlane sketchPlane = null;
    // create a sketch plane using Geometry.Plane
    sketchPlane = SketchPlane.Create(document, plane);
    // throw exception if creation failed
    if (null == sketchPlane)
    {
        throw new Exception("Create the sketch plane failed.");
    }
    return sketchPlane;
} Copy  VB.NET
 Copy  VB.NET Public Shared Function CreateSketchPlane(document As Autodesk.Revit.DB.Document, plane As Plane) As SketchPlane
    Dim sketchPlane__1 As SketchPlane = Nothing
    ' create a sketch plane using Geometry.Plane
    sketchPlane__1 = SketchPlane.Create(document, plane)
    ' throw exception if creation failed
    If sketchPlane__1 Is Nothing Then
        Throw New Exception("Create the sketch plane failed.")
    End If
    Return sketchPlane__1
End FunctionExceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions ArgumentException | Sketch plane creation is not allowed in this family. | 
| Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null | 
| Autodesk.Revit.Exceptions ModificationForbiddenException | The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process. | 
| Autodesk.Revit.Exceptions ModificationOutsideTransactionException | The document has no open transaction. |