RVTDocs.com

GlobalParametersManager.SortParameters

Method
Description:
Sorts global parameters in the desired 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.

Syntax
public static void SortParameters(
	Document document,
	ParametersOrder order
)
Parameters
Parameter Type Description
document Document Document containing the global parameters to be sorted
order ParametersOrder Desired sorting order
Return Value
Exceptions
Exception Condition
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.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration