ShiftNumbers Method


Shifts all numbers in the sequence so the starting number has the given value.

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

Syntax

C#
public void ShiftNumbers(
	string partition,
	int firstNumber
)
Visual Basic
Public Sub ShiftNumbers ( _
	partition As String, _
	firstNumber As Integer _
)
Visual C++
public:
void ShiftNumbers(
	String^ partition, 
	int firstNumber
)

Parameters

partition
Type: SystemString
Name of the partition that identifies the sequence. The sequence must exist.
firstNumber
Type: SystemInt32
Value for the new first (lowest) number of the sequence.

Remarks

A shift of all numbers in the sequence will be computed and applied so the first (lowest) number in the sequence would have the given value. All the other numbers will then be shifted relatively by the same amount.

Any existing gaps in the current numbering sequence will be preserved.

Shifts that would make the start number less than 1 or bigger than MaximumStartingNumber are considered invalid.

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.ExceptionsArgumentOutOfRangeException firstNumber must be in range between 1 and MaximumStartingNumber.
Autodesk.Revit.ExceptionsInvalidOperationException Either the schema or its document cannot be modified at present.

See Also