We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
Your framework looks great, but I'm stuck on how to implement an external event asynchronously. Could you provide an example please.
Another question is it possible to pass parameters to the external event and have an object in return?
A bit like this: https://github.com/KennanChan/Revit.Async
The text was updated successfully, but these errors were encountered:
Hi,
There is a Revit Event handler similar to Revt.Async here
https://github.com/engthiago/Onboxframework/blob/master/src/Revit/Async/IRevitEventHandler.cs
Just register it into container
container.AddRevitAsync(asyncSettings);
public class SampleClass { private readonly IRevitEventHandler _eventHandler; public SampleClass(IRevitEventHandler eventHandler) { _eventHandler = eventHandler; } }
And use it like below.
// With return value public async Task<T> GetSomethingFromRevit { var returnValue = await _eventHandler.RunAsync(uiApp => { // Access Revit Application Classes as such var doc = uiApp.ActiveUIDocument.Document; return something; }); } // As void public async Task DoSomethingInRevit { await _eventHandler.RunAsync(uiApp => { // Access Revit Application Classes as such var doc = uiApp.ActiveUIDocument.Document; // Your Logic Here } }
Sorry, something went wrong.
No branches or pull requests
Hello,
Your framework looks great, but I'm stuck on how to implement an external event asynchronously. Could you provide an example please.
Another question is it possible to pass parameters to the external event and have an object in return?
A bit like this: https://github.com/KennanChan/Revit.Async
The text was updated successfully, but these errors were encountered: