Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.BuildingPads package

Subpackages

Submodules

duHast.Revit.BuildingPads.building_pads module

Revit building pads helper functions.

duHast.Revit.BuildingPads.building_pads.get_all_building_pad_types_by_category(doc)

Gets a filtered element collector of all BuildingPad types in the model.

  • Basic BuildingPad

Filters by category.

Parameters:

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

Returns:

A filtered element collector containing building pad types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.BuildingPads.building_pads.get_building_pad_types_by_class(doc)

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

  • Basic BuildingPad

Filters by class. Since there are no in place families of type building pad possible, this should return the same elements as the by category filter.

Parameters:

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

Returns:

A filtered element collector containing building pad types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.BuildingPads.building_pads.get_all_building_pad_instances_in_model_by_category(doc)

Gets all building pad elements placed in model.

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.BuildingPads.building_pads.get_all_building_pad_instances_in_model_by_class(doc)

Gets all building pad elements placed in model.

Filters by class. Since there are no in place families of type building pad possible, this should return the same elements as the by category filter.

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.BuildingPads.building_pads.get_all_building_pad_type_ids_in_model_by_category(doc)

Gets all building pad 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 building pad type ids.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.BuildingPads.building_pads.get_all_building_pad_type_ids_in_model_by_class(doc)

Gets all building pad element type ids available in model.

Filters by class. Since there are no in place families of type building pad possible, this should return the same elements as the by category filter.

Parameters:

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

Returns:

A filtered element collector containing building pad type ids.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.BuildingPads.purge_unused_building_pad_types module

This module contains a number of helper functions relating to purging Revit building pad types.

duHast.Revit.BuildingPads.purge_unused_building_pad_types.BASIC_BUILDING_PAD_FAMILY_NAME = 'Pad'

Built in family name for pad

duHast.Revit.BuildingPads.purge_unused_building_pad_types.BUILTIN_BUILDING_PAD_TYPE_FAMILY_NAMES = ['Pad']

List of all Built in pad family names

duHast.Revit.BuildingPads.purge_unused_building_pad_types.get_used_building_pad_type_ids(doc)

Gets all used building pad 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 building pad types. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.BuildingPads.purge_unused_building_pad_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. :param fam_type_ids: List of family type ids to check. :type fam_type_ids: List of Autodesk.Revit.DB.ElementId :param un_used_type_ids: Reference list of ids. :type un_used_type_ids: List of Autodesk.Revit.DB.ElementId :return: True if any id from famTypeIds is not in unUsedTypeIds. :rtype: bool

duHast.Revit.BuildingPads.purge_unused_building_pad_types.get_unused_non_in_place_building_pad_type_ids_to_purge(doc)

Gets all unused building pad type id’s. - Basic BuildingPad This method can be used to safely delete unused building pad types: In the case that no building pad instance using any of the types is placed this will return all but one type id since Revit requires at least one building pad 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 building pad types. :rtype: list of Autodesk.Revit.DB.ElementId

Module contents