RebarConstraintCreateConstraintToHostEdge Method |
This method creates a constraint of 'ToHostEdge' type for a given RebarConstrainedHandle.
The RebarConstrainedHandle should belong to a Free Form Rebar and must be allowed to constrain to host edges.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static RebarConstraint CreateConstraintToHostEdge(
RebarConstrainedHandle handle,
IList<Reference> targetReferences
)
Public Shared Function CreateConstraintToHostEdge (
handle As RebarConstrainedHandle,
targetReferences As IList(Of Reference)
) As RebarConstraint
public:
static RebarConstraint^ CreateConstraintToHostEdge(
RebarConstrainedHandle^ handle,
IList<Reference^>^ targetReferences
)
static member CreateConstraintToHostEdge :
handle : RebarConstrainedHandle *
targetReferences : IList<Reference> -> RebarConstraint Parameters
- handle RebarConstrainedHandle
-
The handle of the rebar that will be constrained.
- targetReferences IListReference
-
The references to which the rebar handle will be constrained.
This collection must contain one or more references to edges of an element that can host rebar.
Return Value
RebarConstraint
Returns the newly created RebarConstraint.
Exceptions| Exception | Condition |
|---|
| ArgumentException |
handle is no longer valid.
-or-
targetReferences is empty.
-or-
The RebarConstrainedHandle doesn't allow constraint of RebarConstraintType.ToHostEdge type.
-or-
targetReferences do not represent edges from the same structural that can host rebar.
|
| ArgumentNullException |
A non-optional argument was null
|
See Also