Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.DetailItems package

Subpackages

Submodules

duHast.Revit.DetailItems.detail_items module

This module contains a number of functions around Revit detail items.

duHast.Revit.DetailItems.detail_items.ELEMENT_TYPE = 'Autodesk.Revit.DB.ElementType'

class name Autodesk.Revit.DB.ElementType

duHast.Revit.DetailItems.detail_items.FILLED_REGION_TYPE = 'Autodesk.Revit.DB.FilledRegionType'

class name Autodesk.Revit.DB.FilledRegionType

duHast.Revit.DetailItems.detail_items.FAMILY_SYMBOL = 'Autodesk.Revit.DB.FamilySymbol'

class name Autodesk.Revit.DB.FamilySymbol

duHast.Revit.DetailItems.detail_items.DETAIL_COMPONENT_TYPES = ['Autodesk.Revit.DB.ElementType', 'Autodesk.Revit.DB.FilledRegionType', 'Autodesk.Revit.DB.FamilySymbol']

List of class names which can be detailed components

duHast.Revit.DetailItems.detail_items.get_filled_regions_in_model(doc)

Gets all filled region instances in a model.

Filters by class.

Parameters:

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

Returns:

A list containing floor instances.

Return type:

list Autodesk.Revit.DB.FilledRegion

duHast.Revit.DetailItems.detail_items.get_all_filled_region_type_ids_available(doc)

Gets all filled region types ids in model.

Parameters:

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

Returns:

A list of element ids representing filled region types.

Return type:

list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.detail_items.get_all_detail_types_by_category(doc)

Gets all detail component types in the model.

Filters by built in category.

Parameters:

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

Returns:

A filtered element collector containing detail component types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.DetailItems.detail_items.get_all_repeating_detail_type_ids_available(doc)

Get all repeating detail type id’s in model.

Parameters:

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

Returns:

A list of element ids representing repeating detail types.

Return type:

list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.detail_items.get_all_detail_symbol_ids_available(doc)

Gets all detail symbol (types) ids in model.

Parameters:

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

Returns:

A list of element ids representing detail symbols.

Return type:

list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.detail_items.get_detail_symbols_used_in_repeating_details(doc, ids_repeat_det)

Gets the ids of all symbols used in repeating details.

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

  • idsRepeatDet (list Autodesk.Revit.DB.ElementIds) – List of repeating detail type ids.

Returns:

List of family symbol (type) ids.

Return type:

list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types module

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

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_used_repeating_detail_type_ids(doc)

Gets all used repeating detail 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: A list of element ids representing repeating detail types. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_unused_repeating_detail_type_ids(doc)

Gets all unused repeating detail 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: A list of element ids representing repeating detail types. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_unused_repeating_detail_type_ids_for_purge(doc)

Gets type ids off all unused repeating detail types in model. This method can be used to safely delete unused repeating detail types. In the case that no basic wall instance using any of the types is placed, this will return all but one type id since Revit requires at least one repeating detail 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 all repeating detail types not in use. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_all_used_detail_symbol_ids(doc)

Gets all used detail symbol type ids in 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 family symbol (type) ids. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_all_unused_detail_symbol_ids(doc)

Gets all unused detail symbol type ids in 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 family symbol (type) ids. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_all_unused_detail_symbol_ids_for_purge(doc)

Gets type ids off all unused detail symbols (types) in model. This method can be used to safely delete all unused detail symbols (types) and families. :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids representing all unused detail symbols and families not in use. :rtype: list of Autodesk.Revit.DB.ElementId

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_used_filled_region_type_ids(doc)

Gets all used filled region type ids in 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 filled region type ids. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_unused_filled_region_type_ids(doc)

‘ Gets all unused filled region type ids in 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 filled region type ids. :rtype: list Autodesk.Revit.DB.ElementIds

duHast.Revit.DetailItems.purge_unused_detail_item_types.get_unused_filled_region_type_ids_for_purge(doc)

Gets ids off all unused filled region types in model. This method can be used to safely delete all unused filled region types in model. In the case that no filled region instance using any of the types is placed, this will return all but one type id since Revit requires at least one filled region 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 all unused filled region types not in use. :rtype: list of Autodesk.Revit.DB.ElementId

Module contents