Sample Code Revit Batch Processor 1.1.11 documentation

Contents:

This Page

duHast.UI.Objects.WPF.Commands package

Submodules

duHast.UI.Objects.WPF.Commands.CommandBase module

A class to handle wpf command bindings.

Based on:

https://markheath.net/post/wpf-and-mvvm-in-ironpython https://www.youtube.com/channel/UC7X9mQ_XtTYWzr9Tf_NYcIg

class duHast.UI.Objects.WPF.Commands.CommandBase.CommandBase(*args: Any, **kwargs: Any)

Bases: ICommand

A class to handle wpf command bindings.

Parameters:
  • execute (callable) – The method to execute when the command is invoked.

  • can_execute (callable) – The method to determine if the command can be executed.

Execute(parameter)
on_can_execute_changed()

Raises the CanExecuteChanged event for subscribers.

add_CanExecuteChanged(handler)

Adds a handler to the CanExecuteChanged event.

remove_CanExecuteChanged(handler)

Removes a handler from the CanExecuteChanged event.

CanExecute(parameter)

duHast.UI.Objects.WPF.Commands.RelayCommand module

class duHast.UI.Objects.WPF.Commands.RelayCommand.RelayCommand(*args: Any, **kwargs: Any)

Bases: CommandBase

A class to handle wpf command bindings.

Args:

execute (function): The method to execute when the command is invoked.

Execute(parameter)

Module contents