Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2019
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- constraintsToApply
- Type: System.Collections.GenericIListRebarConstraint
Represent the new constraints to be applied to rebar.
- oldTargets
- Type: System.Collections.GenericIListReference
Represent the old target references.
- newTargets
- Type: System.Collections.GenericIListReference
Represent the new target references.
Return Value
Returns true if the constraints were applied succesfully, false otherwiseRemarks
ShapeDriven : The input constraints belong to other rebar in a (different) similar host. Only constraints of type ToHostFace or ToCover are considered. The method modifies the constraints' target references with their correspondants in current host(s). The modified constraints are set in current rebar. The method will fail : if there exists at least one ToOtherRebar constraint; if corresponding target references in current host(s) are not supplied or found.
FreeForm : The constraints will not be applied and the method will return false.
The two arrays go hand in hand : they must have the same size; the correspondant of oldReference at index x is found in the other array at the same index x.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsInvalidOperationException | The RebarConstraintsManager does not manage a valid Rebar element. |