Assign a new list of constraints to this definition.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
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<(Of <(<'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 AddParameter().
If the Type is Arc or LappedCircle, the allowable constraint types are:
- RebarShapeConstraintArcLength
- RebarShapeConstraintRadius
- RebarShapeConstraintDiameter
- RebarShapeConstraintCircumference
- RebarShapeConstraintSagittaLength
- RebarShapeConstraintChordLength
If the Type is Spiral, the allowable constraints are:
- RebarShapeConstraintRadius
- RebarShapeConstraintDiameter
- RebarShapeConstraintCircumference
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | One or more of the constraints is of a type not supported for this definition. -or- One or more of the constraints refers to a parameter that has not been added yet. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |