ricaun.Revit.UI.Busy 1.0.0

Prefix Reserved
dotnet add package ricaun.Revit.UI.Busy --version 1.0.0                
NuGet\Install-Package ricaun.Revit.UI.Busy -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ricaun.Revit.UI.Busy" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ricaun.Revit.UI.Busy --version 1.0.0                
#r "nuget: ricaun.Revit.UI.Busy, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ricaun.Revit.UI.Busy as a Cake Addin
#addin nuget:?package=ricaun.Revit.UI.Busy&version=1.0.0

// Install ricaun.Revit.UI.Busy as a Cake Tool
#tool nuget:?package=ricaun.Revit.UI.Busy&version=1.0.0                

ricaun.Revit.UI.Busy

Revit 2017 Visual Studio 2022 Nuke License MIT Build nuget

ricaun.Revit.UI.Busy

ricaun.Revit.UI.Busy package provides a static control to monitor the busy state of Revit UI using the Idling event.

This project was generated by the ricaun.AppLoader Revit plugin.

RevitBusyControl

RevitBusyControl is a static control to monitor the busy state of Revit UI using the Idling event, this class need to be initialized.

Initialize

Static initialization of the ricaun.Revit.UI.Busy control.

UIControlledApplication application;
RevitBusyControl.Initialize(application);

RevitBusyService

The RevitBusyService class is available in the static Control property.

RevitBusyService revitBusyService = RevitBusyControl.Control;

IsRevitBusy

To check if Revit is busy, use the IsRevitBusy property.

bool isRevitBuzy = RevitBusyControl.Control.IsRevitBusy;

Binding in wpf

To use binding with the static RevitBusyControl is needed to reference the assembly ricaun.Revit.UI.Busy or using the http://schemas.revit.busy.com/2024/xaml/presentation xmlns.

xmlns:busy="http://schemas.revit.busy.com/2024/xaml/presentation"

The IsRevitBusy property can be used in the binding using the static Control with the RevitBusyService.

{Binding IsRevitBusy, Source={x:Static busy:RevitBusyControl.Control}}

RevitBusyService

The RevitBusyService class provides a service to manage the busy state of Revit using the Idling event.

UIControlledApplication application;
RevitBusyService revitBusyService = new RevitBusyService(application);

The RevitBusyService need to be disposed to clear the Idling event.

revitBusyService.Dispose();

The IsRevitBusy property can be used to check if Revit is busy.

bool isRevitBuzy = revitBusyService.IsRevitBusy;

The INotifyPropertyChanged is available in the RevitBusyService class.

revitBusyService.PropertyChanged += (sender, e) =>
{
	if (e.PropertyName == nameof(revitBusyService.IsRevitBusy))
	{
		// Do something
	}
};

The SetInterval method can be used to set the interval between checks; by default, the value is 1000 milliseconds.

revitBusyService.SetInterval(1000);

License

This project is licensed under the MIT License.


Do you like this project? Please star this project on GitHub!

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 132 8/28/2024