RVTDocs.com
Namespace: Autodesk.Revit.DB Class: FamilyManager

FamilyManager.SortParameters

Method
Description:
Sorts the family parameters according to the desired sort order.
Remarks:

The sort only affects visible parameters within the same parameter group.

Parameters that belong to different groups will remain separated, and the groups' order will not be affected.

The sort is a one-time operation and when new parameters are added they will not be automatically sorted.

Syntax
public void SortParameters(
	ParametersOrder order
)
Examples
private void DisplayParametersInAscendingOrder(Document familyDoc)
{
    FamilyManager familyManager = familyDoc.FamilyManager;
    familyManager.SortParameters(ParametersOrder.Ascending);
}
Parameters
Parameter Type Description
order ParametersOrder The desired sort order.
Return Value
Exceptions
Exception Condition
InvalidOperationException Thrown when this family is a Rebar Shape family which doesn't support parameters reorder.