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.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic Element GetTargetElement(
int targetIndex
)
Public Function GetTargetElement (
targetIndex As Integer
) As Element
public:
Element^ GetTargetElement(
int targetIndex
)
member GetTargetElement :
targetIndex : int -> Element 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| Exception | Condition |
|---|
| 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