Rebar |
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
public bool ApplyRebarConstraints( IList<RebarConstraint> constraintsToApply, IList<Reference> oldTargets, IList<Reference> newTargets )
Public Function ApplyRebarConstraints ( constraintsToApply As IList(Of RebarConstraint), oldTargets As IList(Of Reference), newTargets As IList(Of Reference) ) As Boolean
public: bool ApplyRebarConstraints( IList<RebarConstraint^>^ constraintsToApply, IList<Reference^>^ oldTargets, IList<Reference^>^ newTargets )
member ApplyRebarConstraints : constraintsToApply : IList<RebarConstraint> * oldTargets : IList<Reference> * newTargets : IList<Reference> -> bool
Parameters
- constraintsToApply IListRebarConstraint
- Represent the new constraints to be applied to rebar.
- oldTargets IListReference
- Represent the old target references.
- newTargets IListReference
- Represent the new target references.
Return Value
BooleanReturns true if the constraints were applied succesfully, false otherwise
| Exception | Condition |
|---|---|
| ArgumentException | The constraintsToApply should be for handles with default behavior. |
| ArgumentNullException | A non-optional argument was null |
| InvalidOperationException | The RebarConstraintsManager does not manage a valid Rebar element. |
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.