GetParameterValueAtIndex Method


Get the parameter value for a bar at the specified index. The parameter Id. The bar index in the rebar distribution. Accepts only values between 0 and NumberOfBarPositions-1. The ParameterValue for given parameterId and barPositionIndex. Throws exception if barPositionIndex is outside boundaries.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2017

Syntax

C#
public ParameterValue GetParameterValueAtIndex(
	ElementId paramId,
	int barPositionIndex
)
Visual Basic
Public Function GetParameterValueAtIndex ( _
	paramId As ElementId, _
	barPositionIndex As Integer _
) As ParameterValue
Visual C++
public:
ParameterValue^ GetParameterValueAtIndex(
	ElementId^ paramId, 
	int barPositionIndex
)

Parameters

paramId
Type: Autodesk.Revit.DB ElementId
barPositionIndex
Type: System Int32

Remarks

If the DistributionType is Uniform then the returned ParameterValue is the same no matter the index. If the DistributionType is VaryingLength then the returned ParameterValue is evaluated at the given index.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentOutOfRangeException barPositionIndex is not in the range [ 0, NumberOfBarPositions-1 ].

See Also