Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.UI.files_select package

Submodules

duHast.UI.files_select.ViewModel module

class duHast.UI.files_select.ViewModel.ViewModel(*args: Any, **kwargs: Any)

Bases: ViewModelBase

A base class for WPF view models.

PropertyChanged = None
property TextBoxText_SourcePath
property TextBoxText_Filter
property RadioButton_FilterAnd
property RadioButton_FilterOr
convert_list_to_observable_collection(list_of_items, target_list)

Used transfer items from a standard python list to another list ( of a .net type)

Args:

list_of_items (_type_): _description_ target_list (_type_): _description_

OnPropertyChanged(name)
TextBox_Filter_TextChanged()

Event handler for text changed in TextBox.

text_box_source_path_change()

when the source directory is changes

button_ok()

Ok button event handler.

Gets the selected rows of files and adds them to .selectedFiles property Sets the dialog result value to True.

Parameters:
  • sender (_type_) – _description_

  • EventArgs (_type_) – _description_

button_cancel()

Cancel button event handler. Sets the dialogue result value to False.

Parameters:
  • sender (_type_) – _description_

  • EventArgs (_type_) – _description_

duHast.UI.files_select.files_select_ui module

duHast.UI.files_select.files_select_ui.main(argv)

Entry point.

Parameters:

argv ([str]) – A list of string representing arguments past in.

duHast.UI.files_select.files_select_ui.process_args(argv)

Processes past in arguments and checks whether inputs are valid.

Parameters:

argv (_type_) – List of arguments

Returns:

  • True if arguments past in are valid, otherwise False.

  • FIle select settings object instance.

Return type:

bool, FileSelectionSettings

duHast.UI.files_select.files_select_ui.is_bim_360_file(revit_files)

Checks whether the first item in a file item list belongs to a BIM 360 project.

Checks whether Project GUID property on file item object is None.

Parameters:

revit_files ([FileItem]) – List of file items.

Returns:

True if BIM360 file, otherwise False.

Return type:

bool

Module contents