NumberingSchemaApplyExternalSorting Method

Applies an externally defined sort order to elements in a partition by assigning specific numbers.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void ApplyExternalSorting(
	string partition,
	IDictionary<Reference, int> sortedElements
)

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
ExceptionCondition
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