Rebar |
For ShapeDriven Rebar it will set a preferred 'ToSurface' RebarConstraint for each input handle. The surface that will be used by the constraint is the current surface that is used to compute the position of the handle.
This function applies only for shape driven Rebar, and will throw exception for free form rebar.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

public void SetPreferredConstraintsToSurfaceForHandles(
IList<RebarConstrainedHandle> handles
)
Parameters
- handles IList RebarConstrainedHandle
- The RebarConstrainedHandles for which the 'ToSurface' RebarConstraint will be applied.

Exception | Condition |
---|---|
ArgumentException | One of the RebarConstrainedHandle is no longer valid. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | The RebarConstraintsManager does not manage a valid Rebar element. -or- The RebarConstraintsManager does not manage a shape driven Rebar element. |
