GetTargetElement Method (Int32)


Rebar Constraint Get Target Element(Int 32) 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
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
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →