NumberingSchemaApplyExternalSorting Method |
Applies an externally defined sort order to elements in a partition by assigning specific numbers.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic void ApplyExternalSorting(
string partition,
IDictionary<Reference, int> sortedElements
)
Public Sub ApplyExternalSorting (
partition As String,
sortedElements As IDictionary(Of Reference, Integer)
)
public:
void ApplyExternalSorting(
String^ partition,
IDictionary<Reference^, int>^ sortedElements
)
member ApplyExternalSorting :
partition : string *
sortedElements : IDictionary<Reference, int> -> unit Parameters
- partition String
-
Name of the partition that identifies the sequence to be sorted.
- sortedElements IDictionaryReference, Int32
-
A map of element references to their assigned numbers, defining the new sort order.
Exceptions| Exception | Condition |
|---|
| ArgumentException |
The sequence partition does not exist in the schema.
-or-
The provided sortedElements is incomplete or empty.
-or-
The provided sortedElements contains numbers outside the valid range (0 to INTMAX).
-or-
The references between the current sequence and the sorted sequence don't match.
-or-
Attempting to assign different numbers to matching references.
-or-
Attempting to assign the same number to non-matching references.
|
| ArgumentNullException |
A non-optional argument was null
|
Remarks
This method allows external systems to define the numbering order by providing
a map of elements to their desired numbers. All elements in the partition must be
included in the sorted elements map, and all numbers must be within the valid range.
See Also