2027 Method
Changes 0
M

SketchPlane.Create

Description:
Creates a new sketch plane from a geometric 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.
Overloads (3):
Create(Document,Plane)
public static SketchPlane Create(
	Document document,
	Plane plane
)
  • document
    The document.
  • plane
    The geometry plane where the sketch plane will be created.
Return Value SketchPlane The newly created sketch plane.
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;
}