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: 22.0.0.0 (22.1.0.0)
Since: 2020.1
Syntax
| C# |
|---|
|
| Visual Basic |
|---|
|
| Visual C++ |
|---|
|
Parameters
- handle
- Type: Autodesk.Revit.DB.Structure RebarConstrainedHandle
The RebarConstrainedHandle for which constraint candidates are sought.
- elementId
- Type: Autodesk.Revit.DB ElementId
The elementId ( host or rebar ) of the element in which the candidates are searched for.
Return Value
A collection of RebarConstraintsRemarks
Will throw exception if the provided elementId is not a valid constraint target.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions ArgumentException | elementId is not 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. |