Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Ramps package

Subpackages

Submodules

duHast.Revit.Ramps.purge_unused_ramp_types module

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

duHast.Revit.Ramps.purge_unused_ramp_types.get_used_ramp_type_ids(doc)

Gets all used ramp element type ids available 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 element ids of ramp types. :rtype: List Autodesk.Revit.DB.ElementId

duHast.Revit.Ramps.purge_unused_ramp_types.family_no_types_in_use(fam_type_ids, un_used_type_ids)

Compares two lists of element ids and returns False if any element id in first list is not in the second list. Returns False if any symbols (types) of a family (first lists) are in use in a model (second list). TODO: repetitive code…Consider generic function! :param fam_type_ids: List of family symbols (types). :type fam_type_ids: List of Autodesk.Revit.DB.ElementId :param un_used_type_ids: List of unused family symbols (types) :type un_used_type_ids: List of Autodesk.Revit.DB.ElementId :return: True if all ids in first list are also in second list, otherwise False. :rtype: bool

duHast.Revit.Ramps.purge_unused_ramp_types.get_unused_non_in_place_ramp_type_ids_to_purge(doc)

Gets all unused ramp type ids in the model. This method can be used to safely delete unused ramp types. In the case that no ramp instance using any of the types is placed, this will return all but one type id since Revit requires at least one ramp type definition to be in the model. Unused: Not one instance of this type is placed in the model. - Ramp It will therefore not return any in place family types. (No such thing in Revit?) :param doc: Current Revit model document. :type doc: Autodesk.Revit.DB.Document :return: List of element ids of roof types. :rtype: List Autodesk.Revit.DB.ElementId

duHast.Revit.Ramps.ramps module

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

duHast.Revit.Ramps.ramps.get_all_ramp_types_by_category(doc)

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

Parameters:

doc (_type_) – _description_

Returns:

A filtered element collector containing ramp types.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ramps.ramps.get_all_ramp_instances_by_category(doc)

Gets all ramp elements placed in model…ignores in place families (to be confirmed!)

Parameters:

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

Returns:

A filtered element collector containing ramp instances.

Return type:

Autodesk.Revit.DB.FilteredElementCollector

duHast.Revit.Ramps.ramps.get_all_ramp_types_ids_by_category(doc)

Gets all ramp element type ids available in model.

Parameters:

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

Returns:

List of element ids of ramp types.

Return type:

List Autodesk.Revit.DB.ElementId

Module contents