Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Ceilings package

Subpackages

Submodules

duHast.Revit.Ceilings.ceilings module

Revit ceilings helper functions.

duHast.Revit.Ceilings.ceilings.get_all_ceiling_types_by_category(doc)

Gets a filtered element collector of all ceiling types in the model:

  • Compound Ceiling

  • In place families or loaded families

  • Basic Ceiling

Filters by category. It will therefore not return any roof soffit types ..

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_ceiling_types_by_class(doc)

Gets a filtered element collector of all ceiling types in the model:

  • Roof Soffit

  • Compound Ceiling

  • Basic Ceiling

Filters by class. It will therefore not return any in place family types.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_all_ceiling_instances_in_model_by_category(doc)

Gets all ceiling elements placed in model. Ignores roof soffits.

Filters by category.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling instances.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_all_ceiling_instances_in_model_by_class(doc)

Gets all ceiling elements placed in model. Ignores in place families.

Filters by class.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling instances.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_all_ceiling_type_ids_in_model_by_category(doc)

Gets all ceiling element type ids available in model.

Filters by category.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling type ids.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_all_ceiling_type_ids_in_model_by_class(doc)

Gets all ceiling element type ids available in model.

Filters by class.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing ceiling type ids.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_in_place_ceiling_family_instances(doc)

Gets all instances of in place families of category ceiling.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

A filtered element collector containing in place ceiling instances.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ceilings.ceilings.get_all_in_place_ceiling_type_ids_in_model(doc)

Gets all type ids off all available in place families of category ceiling.

Parameters:

doc (Autodesk.Revit.DB.Document) – Current Revit model document.

Returns:

List of element ids representing in place ceiling types.

Return type:

list of Autodesk.Revit.DB.ElementId

duHast.Revit.Ceilings.purge_unused_ceiling_types module

This module contains a number of helper functions relating to purging Revit ceilings.

duHast.Revit.Ceilings.purge_unused_ceiling_types.COMPOUND_CEILING_FAMILY_NAME = 'Compound Ceiling'

Built in family name for compound ceilings

duHast.Revit.Ceilings.purge_unused_ceiling_types.BASIC_CEILING_FAMILY_NAME = 'Basic Ceiling'

Built in family name for basic ceilings

duHast.Revit.Ceilings.purge_unused_ceiling_types.ROOF_SOFFIT_FAMILY_NAME = 'Roof Soffit'

Built in family name for roof soffits

duHast.Revit.Ceilings.purge_unused_ceiling_types.BUILTIN_CEILING_TYPE_FAMILY_NAMES = ['Compound Ceiling', 'Basic Ceiling', 'Roof Soffit']

List of all Built in ceiling family names

duHast.Revit.Ceilings.purge_unused_ceiling_types.get_used_ceiling_type_ids(doc)

Gets all used ceiling type ids. Filters by category. Used: at least one instance of this type is placed in the model. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing used ceiling types. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.Ceilings.purge_unused_ceiling_types.family_no_types_in_use(fam_type_ids, un_used_type_ids)

Compares two lists of ids. True if any id is not in unUsedTypeIds. TODO: check for more generic list comparison and remove this function.

Parameters:
  • fam_type_ids (List of Autodesk.Revit.DB.ElementId) – List of family type ids to check.

  • un_used_type_ids (List of Autodesk.Revit.DB.ElementId) – Reference list of ids.

Returns:

True if any id from famTypeIds is not in unUsedTypeIds.

Return type:

bool

duHast.Revit.Ceilings.purge_unused_ceiling_types.get_unused_non_in_place_ceiling_type_ids_to_purge(doc)

Gets all unused ceiling type id’s. - Roof Soffit - Compound Ceiling - Basic Ceiling This method can be used to safely delete unused ceiling types: In the case that no ceiling instance using any of the types is placed this will return all but one type id since Revit requires at least one ceiling type definition to be in the model. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing not used ceiling types. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.Ceilings.purge_unused_ceiling_types.get_used_in_place_ceiling_type_ids(doc)

Gets all used in place ceiling type ids in the model. Used: at least one instance of this type is placed in the model. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing used in place ceiling types. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.Ceilings.purge_unused_ceiling_types.get_unused_in_place_ceiling_type_ids(doc)

Gets all unused in place ceiling type ids in the model. Unused: Not one instance of this type is placed in the model. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing unused in place ceiling types. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.Ceilings.purge_unused_ceiling_types.get_unused_in_place_ceiling_ids_for_purge(doc)

Gets symbol(type) ids and family ids (when no type is in use) of in place ceiling families which can be safely deleted from the model. This method can be used to safely delete unused in place ceiling types. There is no requirement by Revit to have at least one in place ceiling definition in the model. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing unused in place ceiling types and families. :rtype: list of Autodesk.Revit.DB.ElementId

Module contents