I suppose you are about asking how to make that dialog to be modeless instead modal; correct?
Yes, there is a way, but I almost hesitate to tell you (and everyone), for it is quite risky. There is a reason for warning dialogs to be modal by default rather than modeless (default in typical Revit commands) when transactions originate from an external application. The reason is that modeless failures handling is tricky, and requires the programmer to strictly follow a particular procedure. Failure to do so may make Revit nonfunctional (meaning – the end user would have to restart).
That ought to be enough as an introduction, perhaps. The point of the above statements was to make you alert. It is really not trivial to handle modeless failures.
In order to turn potential failures to show as modeless during your transaction is to change the default setting for failure-handling-options of that transaction. After you instantiate a transaction, get the failure-handling-option from it, set the modeless-failure-handling to True, and apply the new options back to the transaction. (I am sorry for not showing you a code snippet here – I do not have an access to the code right now – but the failure options is not hard to find on the Transaction class.)
Now, with the modeless failure handling applied, failure messages will appear as in standard Revit command; that means they will not require the end user to click it off. However, this is not the end of the story (and your worries). The important detail is that your call to transaction.Commit() method can now return TransactionStatus.Pending. This is absolutely essential and you must pay attention to it. If you get this status from your transaction you must make sure that you do not do anything with the model. You may not continue modifying the model and you cannot start a new transaction. If you have a transaction group around your transaction, you cannot finish it either, because that is considered a model modification too. You see the problem here? What you’ll deal with is essentially an asynchronous transaction handling. Naturally, there are ways of handling it. If the transaction you are committing is the last one in your command, you can keep it pending and simply return from your external command. Revit will handle it. You may not, however, leave a pending transaction when handling an event. (In fact, Revit does not allow it – it will override your settings). If you need to do anything after the transaction is finally finished (like closing your outer transaction group, for example), you will need a TransactionFinalizer. I will refer you to the RevitAPI hep documentation on this; I believe it is well described there how a finalizer can be used.
Again, modeless failure handling is a tricky business. In no way I mean to underestimate you, however. If you think you can handle it, by all means go for it. (Most transactions in Revit native code use modeless failures handling). On the other hand, if any of the above scares you, you may want to revaluate the risk.
Good luck
Arnošt Löbel