Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Warnings.Objects package

Submodules

duHast.Revit.Warnings.Objects.warnings_overlap_storage module

A class used to store information on separation line overlap warnings.

class duHast.Revit.Warnings.Objects.warnings_overlap_storage.RevitWarningOverlap(id='', element=None, curve=None, group_id=-1, group_instances=0, design_option_id=-1, created_phase_id=-1, demolished_phase_id=-1, **kwargs)

Bases: Base

Class constructor.

duHast.Revit.Warnings.Objects.warnings_storage module

A class used to store Revit warnings information.

This class represents Revit warnings and provides attributes to store information about them, such as the filename, warning ID, description, and associated element IDs.

class duHast.Revit.Warnings.Objects.warnings_storage.RevitWarning(file_name='', id='', description='', element_ids=[], **kwargs)

Bases: Base

A class representing a warning in a Revit file. This class inherits from the base.Base class.

Attributes:
  • file_name (str): The name of the Revit file associated with the warning.

  • id (str): The ID of the warning.

  • description (str): The description of the warning.

  • element_ids (list of str): A list of element IDs associated with the warning.

This class is used to store information about warnings that occur in a Revit file, such as the filename, warning ID, description, and associated element IDs.

Initializes a RevitWarning object.

Args:

file_name (str, optional): The name of the Revit file associated with the warning. Defaults to “”. id (str, optional): The ID of the warning. Defaults to “”. description (str, optional): The description of the warning. Defaults to “”. element_ids (list, optional): A list of element IDs associated with the warning. Defaults to []. **kwargs (optional): Additional keyword arguments to be passed to the base.Base class constructor.

class_to_csv(headers)

Converts the warning object to a CSV list based on the provided headers.

Args:

headers (list): A list of headers for the CSV list.

Returns:

list: The warning object converted to a CSV list.

Module contents