Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Warnings.Reporting package

Submodules

duHast.Revit.Warnings.Reporting.warnings_report module

This module contains a Revit warnings properties report function.

duHast.Revit.Warnings.Reporting.warnings_report.get_warnings_report_data(doc, revit_file_name)

Gets warnings data to be written to report file.

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

  • revit_file_path (str) – The file hostname, which is added to data returned.

Returns:

list of list of sheet properties.

Return type:

list of list of str

duHast.Revit.Warnings.Reporting.warnings_report.convert_warnings_data_to_list(warnings_data)

Converts a list of dictionaries of view properties names and values to a list of properties only.

Parameters:

view_data ([{}]) – List of dictionaries representing view properties

Returns:

A list of lists of view property values.

Return type:

[[str]]

duHast.Revit.Warnings.Reporting.warnings_report.write_warnings_data(file_name, data)

Writes to file all warnings properties.

file type: csv

Parameters:
  • file_name (str) – The fully qualified file path of the report file.

  • current_file_name (str) – The current revit file name which will be appended to data in the report.

Returns:

Result class instance. - .status True if data was written successfully. Otherwise False. - .message will contain write status.

Return type:

Result

duHast.Revit.Warnings.Reporting.warnings_report_header module

This module contains the header row for any Revit warnings reports.

duHast.Revit.Warnings.Reporting.warnings_report_header.REPORT_WARNINGS_HEADER = ['HOSTFILE', 'DATE', 'TIME', 'WARNING ID', 'NUMBER OF WARNINGS', 'WARNING DESCRIPTION', 'NUMBER OF ELEMENTS AFFECTED']

header used in reports

Module contents