RebarConstraint Class

A class representing a constraint on a handle of a rebar element.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: (
Since: 2014


public class RebarConstraint : IDisposable
Visual Basic
Public Class RebarConstraint _
	Implements IDisposable
Visual C++
public ref class RebarConstraint : IDisposable


For Shape Driven Rebar Constraints:

Each handle on a rebar is defined by a plane, and can be constrained along the direction perpendicular to the plane. Rebar constraints work by locking the handle planes to planar references, or 'targets.' These targets can be:

  1. planar surfaces of host elements, or
  2. the handle planes of stirrup bars (only applies to standard style bars).

For planar host element surfaces, a rebar handle can either be locked at a constant distance, or, if the host surface has a specified cover, then the handle can be joined directly to the cover of the surface.

Standard style bars can be locked to the handle planes of stirrup style rebar. In the special case of a straight, standard style bar, running perpendicular to the plane of the stirrup bar, the bar can constrain itself to distinct locations along bends in stirrup bars - points located at 0 degrees, 45 degrees, 90 degrees, etc. around each bend. This is done by simultaneously locking both the straight bar's edge handle and its planar position handle to one or both of the stirrup edges adjacent to the bend in the stirrup.

Usually, to form a constraint, the handle plane and the reference plane must be parallel. However, bar end handles can be constrained to planes at angles up to 60 degrees. Arc-shaped rebar is a special case, and can form constraints to concentric host surfaces.

RebarConstraints can only be constructed internally by Revit. They are available to the API by querying a rebar element's RebarConstraintsManager.

For Free Form Rebar Constraints:

Each handle of the Rebar can be constrained to multiple host faces or to the face cover.

In order to create a Free Form Rebar Constraint you will need:

  1. RebarConstraintsManager which will manage the constraint.
  2. The rebar handle you want to constraint.
  3. A list of target references which must be element faces to which this handle is constrained.
  4. A Boolean value specifying that the constraint is to cover or directly to face. It will be the same value for all target references
  5. A double value that represent the offset distance from the rebar handle to target references.

RebarConstraints for Free Form Rebar should be created using the Create method and then added to the RebarConstraintsManager using the method SetPreferredConstraintForHandle.

Inheritance Hierarchy

System Object
Autodesk.Revit.DB.Structure RebarConstraint

See Also