Programmatically clear warning posted with LogWarningMessageEvents.OnLogWarningMessage

  1. I post a warning using LogWarningMessageEvents.OnLogWarningMessage (for example to tell the user that they need to log in to a product outside of dynamo)

  2. The user performs the log-in (in this case through a custom right-click action added to the Dynamo node via INodeViewCustomization)

  3. How can I then clear the warning that I posted in step 1?

Next time the node executes it should work. You may need a input toggle (i.e. update as an input which does nothing but allows the user to reexecute) or a means of marking your node as dirty when the right click action is made (look to something like the select node in the Dynamo for Revit repo for into one that).

That said I think the right click option is going to be troublesome. A visible button would be better. Or better still, if the users isn’t logged in already, trigger the log-in action. The node can wait for that to finish, and then proceed with the new log-in. This is similar to how the Forma nodes work.