SortParameters Method


Sorts global parameters in the desired order.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2017

Syntax

C#
public static void SortParameters(
	Document document,
	ParametersOrder order
)
Visual Basic
Public Shared Sub SortParameters ( _
	document As Document, _
	order As ParametersOrder _
)
Visual C++
public:
static void SortParameters(
	Document^ document, 
	ParametersOrder order
)

Parameters

document
Type: Autodesk.Revit.DB Document
Document containing the global parameters to be sorted
order
Type: Autodesk.Revit.DB ParametersOrder
Desired sorting order

Remarks

All global parameters are sorted, but only within the range of their respective parameter group.

This operation has no effect on the global parameters themselves. The sorted order is only visible in the standard Global Parameters dialog. However, the order of parameters is serialized in the document, thus available on the DB level as well.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Global parameters are not supported in the given document. A possible cause is that it is not a project document, for global parameters are not supported in Revit families.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

See Also