AddContourRange Method


Add a set of contours as a contour setting item to the current contour setting.

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

Syntax

C#
public ContourSettingItem AddContourRange(
	double start,
	double stop,
	double step,
	ElementId subcategoryId
)
Visual Basic
Public Function AddContourRange ( _
	start As Double, _
	stop As Double, _
	step As Double, _
	subcategoryId As ElementId _
) As ContourSettingItem
Visual C++
public:
ContourSettingItem^ AddContourRange(
	double start, 
	double stop, 
	double step, 
	ElementId^ subcategoryId
)

Parameters

start
Type: SystemDouble
The contour range start elevation.
stop
Type: SystemDouble
The contour range stop elevation. Should be greater than start elevation.
step
Type: SystemDouble
The increment elevation of the contour range. Should be greater than zero.
subcategoryId
Type: Autodesk.Revit.DBElementId
The contour line style subcategory id.

Return Value

The newly added contour setting item.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The given value for start is not finite -or- The given value for stop is not finite -or- The given value for step is not finite -or- The input subcategory id is not valid.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The input contour spacing information is not valid.

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 →