AllowConstraintTargets Method


Returns true if references are valid targets for handle, false otherwise.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2018

Syntax

C#
public bool AllowConstraintTargets(
	RebarConstrainedHandle handle,
	IList<Reference> targetsToConstrain
)
Visual Basic
Public Function AllowConstraintTargets ( _
	handle As RebarConstrainedHandle, _
	targetsToConstrain As IList(Of Reference) _
) As Boolean
Visual C++
public:
bool AllowConstraintTargets(
	RebarConstrainedHandle^ handle, 
	IList<Reference^>^ targetsToConstrain
)

Parameters

handle
Type: Autodesk.Revit.DB.Structure RebarConstrainedHandle
Represents the constrainable rebar handle.
targetsToConstrain
Type: System.Collections.Generic IList Reference
Represent the refernces to be checked as valid targets for handle.

Remarks

For a free form rebar valid targets are one or more references to faces of elements that can host rebar.

For a shape driven rebar this function will always return false. RebarConstraintsManager.GetConstraintCandidatesForHandle() can be used to obtain possible constraints.

Exceptions

Exception Condition
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

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →