Sample Code Revit Batch Processor 1.1.13 documentation

Contents:

This Page

duHast.pyRevit.Objects package

Submodules

duHast.pyRevit.Objects.ProgressPyRevit module

A class used to wrap the pyRevit progress bar form into a call back function.

class duHast.pyRevit.Objects.ProgressPyRevit.ProgressPyRevit(form)

Bases: ProgressBase

Class constructor Args:

form: The progress form to wrap

update(count, total, message=None)

Implementation to update the progress form.

Args:

count: The current count total: The total count message: The message to display

is_cancelled()

Implementation to check if the form has been cancelled.

Returns:

True if the form has been cancelled

duHast.pyRevit.Objects.WPFWindowBasePyRevit module

An implementation of a custom wpf window base class which can be shown in the Revit context.

class duHast.pyRevit.Objects.WPFWindowBasePyRevit.WPFWindowBase(*args: Any, **kwargs: Any)

Bases: WPFWindow

on_current_view_model_changed()
update_content_view(view_model)

Dynamically set the content of the main grid control based on the current view model

Args:

view_model (_type_): The new view model to be applied

on_closed(sender, event)

Handles the Closed event.

Parameters:
  • sender (object) – The sender.

  • event (object) – The event.

action_on_close()

Handles the action on close.

Can be overwritten by derived classes to handle cleanup tasks.

Module contents