CreateConstraintToCustomTarget Method


Rebar Constraint Create Constraint To Custom Target Method

This method creates a constraint of 'ToCustomTarget' type for a given RebarConstrainedHandle.

The RebarConstrainedHandle should belong to a Free Form Rebar should allow constrains to custom target.


Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static RebarConstraint CreateConstraintToCustomTarget(
	RebarConstrainedHandle handle,
	double distanceToCustomTarget
)

Parameters

handle RebarConstrainedHandle
The handle of the rebar that will be constrained.
distanceToCustomTarget Double
The distance to the custom target.

Return Value

RebarConstraint
Returns the newly created RebarConstraint.
Exceptions
Exception Condition
ArgumentException handle is no longer valid. -or- The RebarConstrainedHandle doesn't allow constraint of RebarConstraintType.ToCustomTarget type.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException The given value for distanceToCustomTarget must be no more than 30000 feet in absolute value.
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 →