RemovePreferredConstraintFromHandle Method


Clears the user-preferred RebarConstraint from the specified RebarConstrainedHandle.

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

Syntax

C#
public void RemovePreferredConstraintFromHandle(
	RebarConstrainedHandle handle
)
Visual Basic
Public Sub RemovePreferredConstraintFromHandle ( _
	handle As RebarConstrainedHandle _
)
Visual C++
public:
void RemovePreferredConstraintFromHandle(
	RebarConstrainedHandle^ handle
)

Parameters

handle
Type: Autodesk.Revit.DB.Structure RebarConstrainedHandle
The RebarConstrainedHandle for which the user RebarConstraint is to be deleted.

Remarks

After the preferred constraint is removed, the rebar will search for an appropriate default constraint for the handle in its current position. In some cases, this will cause the handle to snap a small distance to a new target. However, in many situations, the handle will simply remain in its current position, and either continue to use the same constraint target (while no longer treating that target as preferred), or acquire a FixedDistancetoHostFace constraint to the nearest host element surface. The handle will not, in general, be restored to the position it originally occupied before the preferred constraint was applied.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException handle is no longer valid.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException The RebarConstraintsManager does not manage a valid Rebar element.

See Also