Create Method (Document, IList(Curve), SketchPlane, Int32)


Creates a 2D BeamSystem with specified profile curves.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014

Syntax

C#
public static BeamSystem Create(
	Document document,
	IList<Curve> profile,
	SketchPlane sketchPlane,
	int curveIndexForDirection
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	profile As IList(Of Curve), _
	sketchPlane As SketchPlane, _
	curveIndexForDirection As Integer _
) As BeamSystem
Visual C++
public:
static BeamSystem^ Create(
	Document^ document, 
	IList<Curve^>^ profile, 
	SketchPlane^ sketchPlane, 
	int curveIndexForDirection
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document in which the new BeamSystem is created.
profile
Type: System.Collections.Generic IList Curve
The profile of the BeamSystem.
sketchPlane
Type: Autodesk.Revit.DB SketchPlane
The work-plane for the BeamSystem.
curveIndexForDirection
Type: System Int32
Index of the curve in the profile to be used as direction. '0' means the default direction-to use the first curve in profile. The curve from the profile to be used as direction must be a Line.

Return Value

If successful, a new BeamSystem object will be returned.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException SketchPlane is not valid for BeamSystem creation. -or- The input profile contains at least one helical curve and is not supported for this operation. -or- The profile curves must be in the sketch plane. -or- The curve index must be valid and the curve to be used as direction must be a Line.
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.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →