
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
BACKGROUND:
I'm developing a Revit Addin (C#) which has:
1. User interface to show and browse external data
2. Button to update selected item's properties in the model
I have an addin skeleton that executes an external command from the ribbon. My command then opens a non-modal dialog and returns.
CHALLENGE:
My fellow Revit developers told me that nr.2. requires my Addin to stay in the IExternalCommand::Execute context to be able to call Revit API functions.
They said that easiest is to do a Modal UI in the Execute function and run the API calls from that "context".
I can't "do modal" if I need the user to browse both the Revit model view and browse the external data shown by my addin UI.
My first idea was to:
1. open the non-modal Addin UI
2. start an event pump in the Execute function
3. and exit the event loop when my Addin UI is closed
QUESTION(s):
- Am I shooting myself in the foot with this approach?
- What would be the recommended way to design the run-time architecture of such an addin?
- Would a better approach be to register two Addins; The UI Addin, and an additional External command and do like in the example "Revit 2017 Add-In Executing a Custom External Command"
Solved! Go to Solution.