CreateConstraintToRebarEdge Method


Rebar Constraint Create Constraint To Rebar Edge Method

This method creates a constraint of 'ToOtherRebar' type with Edge target type for a given RebarConstrainedHandle.

The RebarConstrainedHandle should belong to a Free Form Rebar, otherwise it will throw exception.


Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public static RebarConstraint CreateConstraintToRebarEdge(
	RebarConstrainedHandle handle,
	IList<ConstraintToRebarEdgeProperties> allEdgesProperties
)

Parameters

handle RebarConstrainedHandle
The handle of the rebar that will be constrained.
allEdgesProperties IList ConstraintToRebarEdgeProperties
An array containing all target edges to which will be constrained and the constraint properties for each target edge.

Return Value

RebarConstraint
Returns the newly created RebarConstraint.
Exceptions
Exception Condition
ArgumentException handle is no longer valid. -or- Constrained rebar isn't a Free Form Rebar element. -or- The RebarConstrainedHandle doesn't allow constraint of RebarConstraintType.ToOtherRebar type, where target is TargetRebarConstraintType.Edge"/>. -or- All targets(TargetRebarEdge) should be different.
ArgumentNullException A non-optional argument was null
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 →