RebarConstraintGetTargetElement(Int32) Method

Gets the Element object (either Host or Rebar) which provides the target reference at specified index for this constraint.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public Element GetTargetElement(
	int targetIndex
)

Parameters

targetIndex  Int32
The index of the target. Should be between 0 and NumberOfTargets().

Return Value

Element
Returns the Element object (either Host or Rebar) which provides the target reference at specified index for this constraint.
Exceptions
ExceptionCondition
ArgumentException targetIndex is out of range.
InvalidOperationException RebarConstraint is no longer valid. -or- The RebarConstraint should not be of RebarConstraintType 'ToSurface'. -or- The RebarConstraintType of the RebarConstraint is 'ToCustomTarget'.
See Also