SetConstraints Method


Assign a new list of constraints to this segment.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)
Since: 2012

Syntax

C#
public void SetConstraints(
	IList<RebarShapeConstraint> constraints
)
Visual Basic
Public Sub SetConstraints ( _
	constraints As IList(Of RebarShapeConstraint) _
)
Visual C++
public:
void SetConstraints(
	IList<RebarShapeConstraint^>^ constraints
)

Parameters

constraints
Type: System.Collections.Generic IList RebarShapeConstraint
A new list of constraints.

Remarks

Any existing constraints are discarded. The new constraints replace them. Any parameters driving the constraints must already be added with RebarShapeDefinition.AddParameter().

The allowable constraint types are:

  • RebarShapeConstraintAngleFromFixedDir
  • RebarShapeConstraintSegmentLength
  • RebarShapeConstraintFixedSegmentDir
  • RebarShapeConstraintProjectedSegmentLength
  • RebarShapeConstraint180DegreeBendArcLength
  • RebarShapeConstraint180DegreeBendRadius
  • RebarShapeConstraint180DegreeDefaultBend
At least two independent constraints must be specified. Overconstraining is supported. Constraints of type RebarShapeConstraintFixedSegmentDir must be unique.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException One or more of the constraints is of a type not supported for RebarShapeSegment.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also