AddNonContinuousRail Method


Creates and appends a new Non-Continuous Rail to the Rail Structure. The new Non-Continuous Rail will have the given name, height and offset. It will have default profile and material ElementIds.

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

Syntax

C#
public NonContinuousRailInfo AddNonContinuousRail(
	string name,
	double height,
	double offset
)
Visual Basic
Public Function AddNonContinuousRail ( _
	name As String, _
	height As Double, _
	offset As Double _
) As NonContinuousRailInfo
Visual C++
public:
NonContinuousRailInfo^ AddNonContinuousRail(
	String^ name, 
	double height, 
	double offset
)

Parameters

name
Type: SystemString
The name of the non-continuous rail.
height
Type: SystemDouble
The height on which the non-continuous rail will be placed.
offset
Type: SystemDouble
The offset of the non-continuous rail from a [!:Autodesk::Revit::DB::Architecture::Railing] center.

Return Value

Handle to the new Non-Continuous Rail.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException name is an empty string or contains only whitespace. -or- name cannot include prohibited characters, such as "{, }, [, ], |, ;, less-than sign, greater-than sign, ?, `, ~". -or- The name is a duplicate of an existing non-continuous rail. -or- The height height is not valid for the non-continuous rail because it is greater than the height of the RailingType to which it belongs.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException The given value for height must be no more than 30000 feet in absolute value. -or- The given value for offset must be no more than 30000 feet in absolute value.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →