Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.Categories.Data.Objects package

Submodules

duHast.Revit.Categories.Data.Objects.category_data module

Family category data class.

class duHast.Revit.Categories.Data.Objects.category_data.CategoryData(root_path=None, root_category_path=None)

Bases: IFamilyData

Class constructor

Parameters:
  • root_path (str) – The path of the nested family in a tree: rootFamilyName :: nestedFamilyNameOne :: nestedFamilyTwo This includes the actual family name as the last node.

  • root_category_path (str) – The category path of the nested family in a tree: rootFamilyCategory :: nestedFamilyOneCategory :: nestedFamilyTwoCategory This includes the actual family category as the last node.

process(doc)

Collects all category data from the document and stores it in the class property .data

Parameters:

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

get_data()
add_data(storage_instance)

duHast.Revit.Categories.Data.Objects.category_data_processor module

Family category data processor class.

class duHast.Revit.Categories.Data.Objects.category_data_processor.CategoryProcessor(pre_actions=None, post_actions=None)

Bases: IFamilyProcessor

Class constructor.

data_type = 'CategoryProcessor'
process(doc, root_path, root_category_path)

Calls processor instance with the document and root path provided and adds processor instance to class property .data

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

  • root_path (str) – The path of the nested family in a tree: rootFamilyName :: nestedFamilyNameOne :: nestedFamilyTwo This includes the actual family name as the last node.

  • root_category_path (str) – The category path of the nested family in a tree: rootFamilyCategory :: nestedFamilyOneCategory :: nestedFamilyTwoCategory This includes the actual family category as the last node.

duHast.Revit.Categories.Data.Objects.category_data_processor_defaults module

Category data default names.

duHast.Revit.Categories.Data.Objects.category_data_storage module

Class for family base data storage class.

class duHast.Revit.Categories.Data.Objects.category_data_storage.FamilyCategoryDataStorage(root_name_path, root_category_path, family_name, family_file_path, use_counter, used_by, category_name, sub_category_name, sub_category_id, category_graphics_style_three_d, category_graphics_style_cut, category_graphics_style_projection, property_material_name, property_material_id, property_line_weight_cut_name, property_line_weight_projection_name, property_line_colour_red_name, property_line_colour_green_name, property_line_colour_blue, **kwargs)

Bases: IFamilyDataStorage

Class constructor

data_type = 'Category'
number_of_properties = 20

duHast.Revit.Categories.Data.Objects.category_data_storage_used_by module

Class for category data used by storage class.

class duHast.Revit.Categories.Data.Objects.category_data_storage_used_by.FamilyCategoryDataStorageUsedBy(family_name='', element_id=-1, j=None, **kwargs)

Bases: IFamilyDataStorageUsedBy

Class constructor

data_type = 'FamilyCategoryDataStorageUsedBy'

Module contents