Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.LinePattern.Objects package

Submodules

duHast.Revit.LinePattern.Objects.LineStylePurgeModifier module

A class used to implement deleted element count for line styles when using purge by delete.

  • checks whether the deleted element count is a list of 2 entries

  • checks whether the first entry is a line style id

  • checks whether the second entry is a graphics style id belonging to the line style id

This class is used to modify the deleted element count for line styles when using purge by delete because this modifier is called after the elements are deleted from the model but a reference is required of them before they are deleted.

class duHast.Revit.LinePattern.Objects.LineStylePurgeModifier.LineStylePurgeModifier(doc)

Bases: ModifierBase

Class constructor.

modify_deleted(doc, deleted)

Base implementation override to modify the deleted element count.

Returns deleted element list unchanged if: - deleted is not a c# List[ElementId] - deleted is not exactly two ids - first deleted id is not in the dictionary of graphic style ids by line style ids - second deleted is not equal to the dictionary value of the first deleted id

Returns: - deleted element list with the first id adjusted to 1 if the second id is equal to the dictionary value of the first id

Args:

deleted: The deleted element count

Module contents