Revit 2025 API
Rebar |
This method creates a constraint for a given RebarConstrainedHandle.
Will throw exception if used for Shape Driven Rebar.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static RebarConstraint Create( RebarConstrainedHandle handle, IList<Reference> targetReferences, bool isConstraintToCover, double offsetValue )
Public Shared Function Create ( handle As RebarConstrainedHandle, targetReferences As IList(Of Reference), isConstraintToCover As Boolean, offsetValue As Double ) As RebarConstraint
public: static RebarConstraint^ Create( RebarConstrainedHandle^ handle, IList<Reference^>^ targetReferences, bool isConstraintToCover, double offsetValue )
static member Create : handle : RebarConstrainedHandle * targetReferences : IList<Reference> * isConstraintToCover : bool * offsetValue : float -> 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 faces of elements that can host rebar.
- isConstraintToCover Boolean
- If true the RebarConstraintType will be set to ToCover, otherwise RebarConstraintType will be set to FixedDistanceToHostFace.
- offsetValue Double
- The distance from references to the rebar handle.
Return Value
RebarConstraintReturns the newly created RebarConstraint.

Exception | Condition |
---|---|
ArgumentException | Constrained rebar isn't a free form rebar element. -or- handle is no longer valid. -or- targetReferences is empty. -or- targetReferences do not represent faces from structurals that can host rebar. |
ArgumentNullException | A non-optional argument was null |
See Also