GetConstraintCandidatesForHandle Method (RebarConstrainedHandle, ElementId)


For shape driven rebar returns all possible RebarConstraints belonging to references from the provided element that could be used for a specified RebarConstrainedHandle.

For free form rebar will return an empty list.

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

Syntax

C#
public IList<RebarConstraint> GetConstraintCandidatesForHandle(
	RebarConstrainedHandle handle,
	ElementId elementId
)
Visual Basic
Public Function GetConstraintCandidatesForHandle ( _
	handle As RebarConstrainedHandle, _
	elementId As ElementId _
) As IList(Of RebarConstraint)
Visual C++
public:
IList<RebarConstraint^>^ GetConstraintCandidatesForHandle(
	RebarConstrainedHandle^ handle, 
	ElementId^ elementId
)

Parameters

handle
Type: Autodesk.Revit.DB.StructureRebarConstrainedHandle
The RebarConstrainedHandle for which constraint candidates are sought.
elementId
Type: Autodesk.Revit.DBElementId
The elementId ( host or rebar ) of the element in which the candidates are searched for.

Return Value

A collection of RebarConstraints

Remarks

Will throw exception if the provided elementId is not a valid constraint target.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException elementId is not a valid RebarConstraint target element.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The RebarConstraintsManager does not manage a valid Rebar element.

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 →