CreateStartConstraint Method


Creates a constraint for the start handle of the rebar. This constraint will be set preferred after the API execution is finished successfully.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018

Syntax

C#
public bool CreateStartConstraint(
	IList<Reference> targetReferences,
	bool isConstraintToCover,
	double offsetValue
)
Visual Basic
Public Function CreateStartConstraint ( _
	targetReferences As IList(Of Reference), _
	isConstraintToCover As Boolean, _
	offsetValue As Double _
) As Boolean
Visual C++
public:
bool CreateStartConstraint(
	IList<Reference^>^ targetReferences, 
	bool isConstraintToCover, 
	double offsetValue
)

Parameters

targetReferences
Type: System.Collections.GenericIListReference
The references to which the rebar handle will be constrained. Will throw exception if it's empty or if it's anything but Face(s) from a structural that can host rebar.
isConstraintToCover
Type: SystemBoolean
If true the RebarConstraintType will be set to ToCover, otherwise RebarConstraintType will be set to FixedDistanceToHostFace.
offsetValue
Type: SystemDouble
The distance from references to the rebar handle.

Return Value

Returns true if a start constraint can be created with the given references, false otherwise. The reference should be faces from structurals that can host rebar.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →