AllowConstraintTargets Method


Rebar Constraints Manager Allow Constraint Targets Method

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

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public bool AllowConstraintTargets(
	RebarConstrainedHandle handle,
	IList<Reference> targetsToConstrain
)

Parameters

handle RebarConstrainedHandle
Represents the constrainable rebar handle.
targetsToConstrain IList Reference
Represent the refernces to be checked as valid targets for handle.

Return Value

Boolean
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
InvalidOperationException The RebarConstraintsManager does not manage a valid Rebar element.
Remarks

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

If the handle accepts constraints to edges, the references should be edges of elements that can host rebar.

If the handle does not accept constraints to edges, the references should be 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.

See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →