Sample Code Revit Batch Processor 1.1.11 documentation
This will delete all subcategories which are user created ( id greater then 0) and are not used by any element in the family or nested families.
requires a revit category processor object
This function deletes all user-created subcategories (with IDs greater than 0) that are not used by any element in the family or nested families.
doc (Autodesk.Revit.DB.Document) – Current Revit model document.
processor (CategoryProcessor
) – A CategoryProcessor object containing all subcategory information of the family document and any nested families.
Result class instance. - result.status (bool): True if all unused subcategories were deleted successfully or none needed to be deleted, otherwise False. - result.message (str): Property updated in the format: “Found unused subcategory: family category Name : subcategory Name [subcategory Id]”
status (bool): False.
message (str): Contains the exception message.