Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.Revit.SharedParameters.Data.Objects package

Submodules

duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data module

Family shared parameter data class.

class duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data.SharedParameterData(root_path=None, root_category_path=None)

Bases: IFamilyData

Initialize the shared parameter data object.

Parameters:
  • root_path (str) – Root path of the family.

  • root_category_path (str) – Root category path of the family.

process(doc)

Process the document and find all shared parameters in the family. Update the data storage with the shared parameter data.

Parameters:

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

Returns:

None

get_data()

Get the shared parameter data.

Returns:

List of shared parameter data storage instances.

add_data(storage_instance)

Add shared parameter data to the data storage.

Parameters:

storage_instance (FamilySharedParameterDataStorage) – Shared parameter data storage instance.

Returns:

None

duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data_processor module

Family shared parameter data processor class.

class duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data_processor.SharedParameterProcessor(pre_actions=None, post_actions=None)

Bases: IFamilyProcessor

Class constructor.

data_type = 'SharedParameterProcessor'
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.

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

  • rootCategoryPath (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.SharedParameters.Data.Objects.shared_parameter_data_processor_defaults module

Shared parameters data default names.

duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data_storage module

Class for family shared parameter data storage class.

class duHast.Revit.SharedParameters.Data.Objects.shared_parameter_data_storage.FamilySharedParameterDataStorage(root_name_path, root_category_path, family_name, family_file_path, parameter_guid, parameter_name, parameter_id, use_counter, used_by, **kwargs)

Bases: IFamilyDataStorage

Class constructor

data_type = 'SharedParameter'
number_of_properties = 10

duHast.Revit.SharedParameters.Data.Objects.shared_parameter_storage_used_by module

Class for category data used by storage class.

class duHast.Revit.SharedParameters.Data.Objects.shared_parameter_storage_used_by.FamilySharedParameterDataStorageUsedBy(family_name='', element_id=-1, j=None, **kwargs)

Bases: IFamilyDataStorageUsedBy

Class constructor

data_type = 'FamilySharedParameterDataStorageUsedBy'

Module contents