NumberingSchemaSwapNumber Method

Replaces an existing number with a another one that exists in the same partition.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public IList<ElementId> SwapNumber(
	string partition,
	int firstNumber,
	int secondNumber
)

Parameters

partition  String
Name of the partition that identifies the sequence containing the number to be changed.
firstNumber  Int32
Number to be swapped
secondNumber  Int32
Number to be swapped

Return Value

IListElementId
A collection of elements affected by the change of the number
Exceptions
ExceptionCondition
ArgumentException The sequence partition does not exist in the schema. -or- The specified sequence does not contain any elements with the given firstNumber. -or- The specified sequence does not contain any elements with the given secondNumber.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException The value of firstNumber must be in the range from 1 to the maximum value for an Integer type -or- The value of secondNumber must be in the range from 1 to the maximum value for an Integer type
InvalidOperationException Either the schema or its document cannot be modified at present. -or- Can't access the number while an async operation is running.
See Also