For shape driven rebar returns all possible RebarConstraints that will constrain RebarConstrainedHandle to the provided reference.
For free form rebar will return an empty lists.
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2020.1
Syntax
C# |
---|
public IList<RebarConstraint> GetConstraintCandidatesForHandle( RebarConstrainedHandle handle, Reference reference ) |
Visual Basic |
---|
Public Function GetConstraintCandidatesForHandle ( _ handle As RebarConstrainedHandle, _ reference As Reference _ ) As IList(Of RebarConstraint) |
Visual C++ |
---|
public: IList<RebarConstraint^>^ GetConstraintCandidatesForHandle( RebarConstrainedHandle^ handle, Reference^ reference ) |
Parameters
- handle
- Type: Autodesk.Revit.DB.Structure..::..RebarConstrainedHandle
The RebarConstrainedHandle for which constraint candidates are sought.
- reference
- Type: Autodesk.Revit.DB..::..Reference
The reference you want to constrain to.
Return Value
A collection of RebarConstraints
Remarks
Will throw exception if the provided reference cannot be used to constrain the provided rebar handle.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | reference is not from a valid RebarConstraint target element. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..InvalidOperationException | The RebarConstraintsManager does not manage a valid Rebar element. |