GetPreferredConstraintOnHandle Method


For ShapeDriven: Returns the RebarConstraint that has been set as preferred for the specified RebarConstrainedHandle.

For FreeForm: Returns the RebarConstraint that acts on the specified RebarConstraintHandle.

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

Syntax

C#
public RebarConstraint GetPreferredConstraintOnHandle(
	RebarConstrainedHandle handle
)
Visual Basic
Public Function GetPreferredConstraintOnHandle ( _
	handle As RebarConstrainedHandle _
) As RebarConstraint
Visual C++
public:
RebarConstraint^ GetPreferredConstraintOnHandle(
	RebarConstrainedHandle^ handle
)

Parameters

handle
Type: Autodesk.Revit.DB.StructureRebarConstrainedHandle
The RebarConstrainedHandle for which the RebarConstraint is to be returned.

Return Value

The user preferred RebarConstraint applied to the RebarConstrainedHandle.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException handle is no longer valid.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The RebarConstraintsManager does not manage a valid Rebar element.

See Also