NumberingSchemaSwapNumber Method |
Replaces an existing number with a another one that exists in the same partition.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic IList<ElementId> SwapNumber(
string partition,
int firstNumber,
int secondNumber
)
Public Function SwapNumber (
partition As String,
firstNumber As Integer,
secondNumber As Integer
) As IList(Of ElementId)
public:
IList<ElementId^>^ SwapNumber(
String^ partition,
int firstNumber,
int secondNumber
)
member SwapNumber :
partition : string *
firstNumber : int *
secondNumber : int -> IList<ElementId> 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| Exception | Condition |
|---|
| 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