Message 1 of 23
Can you chain Idling events?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to chain Idling events?
Say I have two functions, FuncA and FuncB. I want to run FuncA the first time revit idles, then run FuncB after FuncA is done running and revit idles again. Inside my FuncA handler, I am removing the handler to FuncA from UIApp.Idling, but I can not assign a new handler because I don't have a valid API context.
Is there a way for me to achieve my intended behavior?
NOTE: The reason I'm doing any of this at all is because of this referenced post. For some reason, Revit throws an internal exception if my FuncA and FuncB are called one after the other. So I am separating them with an idling event. Now I need to add another idling event before FuncA.