Sample Code Revit Batch Processor 1.1.16 documentation

Contents:

This Page

duHast.Revit.Views.Import package

Submodules

duHast.Revit.Views.Import.create_filter_from_storage module

This module contains a number of helper functions relating to Revit view filters storage creation from json.

duHast.Revit.Views.Import.create_filter_from_storage.import_rules_from_data(doc, data_rules)
duHast.Revit.Views.Import.create_filter_from_storage.import_nested_logic_container_from_data(doc, logic_filter_containers)
duHast.Revit.Views.Import.create_filter_from_storage.import_root_logic_container_from_data(doc, view_filter_json)
duHast.Revit.Views.Import.create_filter_from_storage.create_filter_from_json(doc, view_filter_json, element_filters)
duHast.Revit.Views.Import.create_filter_from_storage.update_filter_from_json(doc, existing_filter, view_filter_json, element_filters)
duHast.Revit.Views.Import.create_filter_from_storage.get_filters_in_model_by_name(doc)

Get all view filters in the model by name.

Parameters:

doc – Revit Document

Returns:

Dictionary of view filters by name

duHast.Revit.Views.Import.create_filter_from_storage.import_view_filters_from_data(doc, json_object, progress_callback=None, overwrite_existing=False)

duHast.Revit.Views.Import.read_filter_storage module

This module contains a number of helper functions relating to Revit view filters storage reading from file.

duHast.Revit.Views.Import.read_filter_storage.read_filter_storage_from_file(file_path, node_name='')

Read the view filter storage from file.

Parameters:

file_path (str) – Full path to the file including file name.

Returns:

Result message and list of view filter storage objects.

Return type:

tuple (result message, list of view filter storage objects)

duHast.Revit.Views.Import.schedules_width_read_from_file module

duHast.Revit.Views.Import.schedules_width_read_from_file.read_column_width_data_file(file_path)

Reads the column width data from a csv file and returns it as a dictionary of dictionaries, where the key is the schedule id and the values are the field name (key) and column width (value) to set.

Parameters:

file_path (str) – The file path of the csv file to read.

Returns:

A list of dictionaries containing the schedule name, field name and column width to set.

Return type:

dict[int, dict[str, int]]

Module contents