RebarConstraintReplaceReferenceTargets(IListReference, RebarConstraintType) Method |
Replaces the current set of references, with the newly provided ones.
Will throw exception if this is a constraint for Shape Driven Rebar.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic void ReplaceReferenceTargets(
IList<Reference> targetReferences,
RebarConstraintType newConstraintType
)
Public Sub ReplaceReferenceTargets (
targetReferences As IList(Of Reference),
newConstraintType As RebarConstraintType
)
public:
void ReplaceReferenceTargets(
IList<Reference^>^ targetReferences,
RebarConstraintType newConstraintType
)
member ReplaceReferenceTargets :
targetReferences : IList<Reference> *
newConstraintType : RebarConstraintType -> unit Parameters
- targetReferences IListReference
-
The references to which the rebar handle will be constrained.
This collection must contain one or more references to faces or edges of elements that can host rebar.
- newConstraintType RebarConstraintType
-
The type of constraint to be set. Can only be 'ToCover', 'FixedDistanceToHostFace', 'ToHostEdge' or 'ToHostEdgeCover'.
In case the type is 'ToHostEdge' or 'ToHostEdgeCover' the references must be of edges, otherwise of faces.
Exceptions| Exception | Condition |
|---|
| ArgumentException |
targetReferences is empty.
-or-
newConstraintType is not 'ToHostEdge', 'ToHostEdgeCover', 'ToCover' or 'FixedDistanceToHostFace'.
-or-
targetReferences do not represent edges or faces from structurals that can host rebar.
-or-
The handle of the constraint do not accept this type of constraint.
|
| ArgumentNullException |
A non-optional argument was null
|
| ArgumentOutOfRangeException |
A value passed for an enumeration argument is not a member of that enumeration
|
| InvalidOperationException |
Constrained rebar isn't a Free Form Rebar element.
|
See Also