NewExtrusion Method


Family Item Factory New Extrusion Method

Add a new Extrusion instance into the Autodesk Revit family document.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public Extrusion NewExtrusion(
	bool isSolid,
	CurveArrArray profile,
	SketchPlane sketchPlane,
	double end
)

Parameters

isSolid Boolean
Indicates if the Extrusion is Solid or Void.
profile CurveArrArray
The profile of the newly created Extrusion. This may contain more than one curve loop. Each loop must be a fully closed curve loop and the loops may not intersect. All input curves must lie in the same plane. The loop can be a unbound circle or ellipse, but its geometry will be split in two in order to satisfy requirements for sketches used in extrusions.
sketchPlane SketchPlane
The sketch plane for the extrusion. The direction of extrusion is determined by the normal for the sketch plane. To extrude in the other direction set the end value to negative.
end Double
The length of the extrusion.

Return Value

Extrusion
If creation was successful the new Extrusion is returned, otherwise an exception with failure information will be thrown.
Exceptions
Exception Condition
ArgumentException Thrown when the input argument-profile-is or empty array.
ArgumentNullException Thrown when the input argument-sketchPlane-is .
ArgumentException Thrown when the input argument-sketchPlane-is an invalid sketch plane.
InvalidOperationException Thrown when the creation failed.
Remarks
This method creates an extrusion in a family document. The extrusion will be extended perpendicular to the sketch plane of the extrusion profile.
See Also