RebarConstraintCreateConstraintToCustomTarget 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.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static RebarConstraint CreateConstraintToCustomTarget(
RebarConstrainedHandle handle,
double distanceToCustomTarget
)
Public Shared Function CreateConstraintToCustomTarget (
handle As RebarConstrainedHandle,
distanceToCustomTarget As Double
) As RebarConstraint
public:
static RebarConstraint^ CreateConstraintToCustomTarget(
RebarConstrainedHandle^ handle,
double distanceToCustomTarget
)
static member CreateConstraintToCustomTarget :
handle : RebarConstrainedHandle *
distanceToCustomTarget : float -> RebarConstraint 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