Family's Category can't be changed because the Family contains Shared Parameters which are not permitted in the new Category.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
C#
public static FailureDefinitionId FamilyNoExternalParametersError { get; }