SetRodLength Method


Set the rod length of the hanger for the specified rod index, excluding top extension. The hanger must not be set to be auto-hosted.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018

Syntax

C#
public bool SetRodLength(
	int rodIndex,
	double newLength
)
Visual Basic
Public Function SetRodLength ( _
	rodIndex As Integer, _
	newLength As Double _
) As Boolean
Visual C++
public:
bool SetRodLength(
	int rodIndex, 
	double newLength
)

Parameters

rodIndex
Type: SystemInt32
The rod index.
newLength
Type: SystemDouble

Return Value

Returns true if it was successful otherwise false.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentOutOfRangeException the index rodIndex is should be in range of rod count.
Autodesk.Revit.ExceptionsInvalidOperationException The rod length cannot be set because the hanger is set to automatically host to other elements.

See Also