RemoveGaps Method


Removes gaps, if any, in a numbering sequence

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

Syntax

C#
public void RemoveGaps(
	string partition
)
Visual Basic
Public Sub RemoveGaps ( _
	partition As String _
)
Visual C++
public:
void RemoveGaps(
	String^ partition
)

Parameters

partition
Type: SystemString
Name of the partition that identifies the sequence. The sequence must exist.

Remarks

Gaps are removed by shifting numbers above each gap down by the amount of numbers skipped in the gap. The lowest number in the sequence will remain unchanged.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The sequence partition does not exist in the schema.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Either the schema or its document cannot be modified at present.

See Also